// Variables and theme system
:root {
  // Colors - Light theme
  --color-body-bg: #ffffff;
  --color-body-bg-rgb: 255, 255, 255;
  --color-text: #000000;
  --color-text-secondary: #7a7a7b;
  --color-primary: #335eea;
  --color-primary-rgb: 51, 94, 234;
  --color-primary-bg: #eaeffd;
  --color-secondary-bg: #f5f5f7;
  --color-navbar-bg: rgba(255, 255, 255, 0.86);
  --color-sidebar-bg: #fafafa;
  --color-player-bg: #ffffff;
  --color-border: #e5e5e7;
  --color-hover: #f0f0f0;
  --color-active: #335eea;
  --color-error-rgb: 220, 38, 38;

  // Status colors
  --color-success: #10b981;
  --color-success-hover: #059669;
  --color-danger: #ef4444;
  --color-danger-hover: #dc2626;
  --color-warning: #f59e0b;
  --color-warning-hover: #d97706;
  --color-info: #3b82f6;
  --color-info-hover: #2563eb;

  // Shadows
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 4px 20px rgba(0, 0, 0, 0.12);

  // Gradients
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, #4f7cff 100%);
  --gradient-secondary: linear-gradient(135deg, #f5f5f7 0%, #e8e8ea 100%);
  --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
  --gradient-overlay: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100%);

  // Card and Layout
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 20px;
  --border-radius-card: var(--border-radius-md);
  --border-radius-cover: var(--border-radius-lg);

  // Animation
  --transition-fast: 0.15s ease-out;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);

  // Content spacing
  --content-padding: 32px;
  --section-gap: 48px;
  --card-gap: 24px;

  // Spacing
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;

  // Border radius
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  // Typography
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;

  // Transitions
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

// Dark theme
[data-theme='dark'] {
  --color-body-bg: #222222;
  --color-body-bg-rgb: 34, 34, 34;
  --color-text: #ffffff;
  --color-text-secondary: #a0a0a0;
  --color-primary: #335eea;
  --color-primary-rgb: 51, 94, 234;
  --color-primary-bg: #2a3a5c;
  --color-secondary-bg: #323232;
  --color-navbar-bg: rgba(34, 34, 34, 0.86);
  --color-sidebar-bg: #1a1a1a;
  --color-player-bg: #2a2a2a;
  --color-border: #404040;
  --color-hover: #3a3a3a;
  --color-active: #335eea;

  // Status colors for dark theme
  --color-success: #10b981;
  --color-success-hover: #059669;
  --color-danger: #ef4444;
  --color-danger-hover: #dc2626;
  --color-warning: #f59e0b;
  --color-warning-hover: #d97706;
  --color-info: #3b82f6;
  --color-info-hover: #2563eb;

  // Dark theme gradients
  --gradient-secondary: linear-gradient(135deg, #323232 0%, #2a2a2a 100%);
  --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  --gradient-overlay: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%);

  // 深色主题下的图标颜色：纯白色
  .sidebar-toggle-btn .icon {
    filter: brightness(0) saturate(100%) invert(1);
  }

  .sidebar-toggle-btn:hover .icon {
    filter: brightness(0) saturate(100%) invert(1);
  }

  .settings-close-btn .icon {
    filter: brightness(0) saturate(100%) invert(1);
  }

  .settings-close-btn:hover .icon {
    // 悬停时变为红色，在深色主题下保持可见性
    filter: brightness(0) saturate(100%) invert(0.8) sepia(1) saturate(5) hue-rotate(0deg);
  }

  .nav-button .icon {
    filter: brightness(0) saturate(100%) invert(1);
  }

  .nav-button:hover .icon {
    filter: brightness(0) saturate(100%) invert(1);
  }

  // 侧边栏图标：深色主题下纯白色（非激活状态）
  .sidebar-icon {
    filter: brightness(0) saturate(100%) invert(1);
  }

  // 激活状态的图标颜色：深色主题下的蓝色主题色
  .sidebar-link.active .sidebar-icon {
    filter: brightness(0) saturate(100%) invert(0.9) sepia(1) saturate(5) hue-rotate(220deg) !important;
  }

  // 歌单项激活状态的图标颜色：深色主题下保持一致
  .playlist-sidebar-item.active .sidebar-icon {
    filter: brightness(0) saturate(100%) invert(0.9) sepia(1) saturate(5) hue-rotate(220deg) !important;
  }

  // 侧边栏导航链接文字：深色主题下纯白色
  .sidebar-link {
    color: #ffffff;

    &:hover {
      color: #ffffff;
    }

    &.active {
      // 激活状态保持主题色
      color: var(--color-primary);
    }
  }

  // 歌单项文字：深色主题下保持一致
  .playlist-sidebar-item {
    color: #ffffff;

    &:hover {
      color: #ffffff;
    }

    &.active {
      // 激活状态保持主题色，与导航链接一致
      color: var(--color-primary);
    }
  }

  // 侧边栏按钮文字：深色主题下纯白色
  .sidebar-button {
    color: #ffffff;

    &:hover {
      color: #ffffff;
    }
  }
}

.hide-cursor {
  cursor: none !important;
}

// Reset and base styles
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  overflow: hidden;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-body-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

// Custom scrollbar styles
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.3);
  border-radius: 4px;
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(128, 128, 128, 0.5);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

// Firefox scrollbar
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(128, 128, 128, 0.3) transparent;
}

// Dark theme scrollbar
[data-theme='dark'] {
  ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
  }

  ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
  }

  * {
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  }
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  outline: none;
  transition: all var(--transition-fast);
}

input {
  font-family: inherit;
  outline: none;
  border: none;
}

a {
  color: inherit;
  text-decoration: none;
}

// Loading screen
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-body-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity var(--transition-normal);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-secondary-bg);
  border-top: 3px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: var(--spacing-md);
}

.loading-text {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.cache-loading-status {
  margin-top: var(--spacing-md);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  text-align: center;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

// Main app layout
.app {
  display: grid;
  grid-template-areas:
    "navbar navbar"
    "sidebar main"
    "player player";
  grid-template-rows: 64px 1fr 80px;
  grid-template-columns: 240px 1fr;
  height: 100vh;
  overflow: hidden;
  transition: grid-template-columns var(--transition-normal);

  // 收缩状态
  &.sidebar-collapsed {
    grid-template-columns: 64px 1fr;
  }
}

// Navigation bar
.navbar {
  grid-area: navbar;
  background: var(--color-navbar-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--spacing-lg);

  // 允许拖拽窗口（除了按钮和输入框）
  -webkit-app-region: no-drag;

  // 拖拽区域样式
  &:not(:has(button:hover)):not(:has(input:hover)):not(:has(.search-container:hover)) {
    cursor: default;
  }
}

.navbar-left,
.navbar-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.navbar-center {
  flex: 1;
  max-width: 600px;
  margin: 0 var(--spacing-xl);
}

.nav-button {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);

  &:hover:not(:disabled) {
    background: var(--color-hover);
    color: var(--color-text);
  }

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .icon {
    width: 20px;
    height: 20px;
    transition: all var(--transition-fast);
    // 浅色主题：纯黑色图标
    filter: brightness(0) saturate(100%) invert(0);
  }

  &:hover .icon {
    // 悬停时保持纯黑色
    filter: brightness(0) saturate(100%) invert(0);
  }

  // 窗口控制按钮特殊样式
  &#minimize-btn:hover {
    background: rgba(0, 122, 255, 0.1);
  }

  &#maximize-btn:hover {
    background: rgba(0, 122, 255, 0.1);
  }

  &#close-btn:hover {
    background: rgba(255, 59, 48, 0.1);

    .icon {
      filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
    }
  }
}

.search-container {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 var(--spacing-md) 0 40px;
  background: var(--color-secondary-bg);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);

  &::placeholder {
    color: var(--color-text-secondary);
  }

  &:focus {
    background: var(--color-body-bg);
    box-shadow: 0 0 0 2px var(--color-primary);
  }
}

.search-icon {
  position: absolute;
  left: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  fill: var(--color-text-secondary);
  pointer-events: none;
}

// Icon styles
.icon {
  width: 20px;
  height: 20px;
  fill: currentColor;

  // For img icons - 浅色主题：纯黑色
  &[src] {
    filter: brightness(0) saturate(100%) invert(0);
    transition: filter var(--transition-fast);
  }
}

// Icon color adjustments for different states
.control-button:hover .icon[src] {
  // 悬停时保持纯黑色
  filter: brightness(0) saturate(100%) invert(0);
}

.control-button.primary .icon[src] {
  // 主要按钮保持白色（用于深色背景）
  filter: brightness(0) saturate(100%) invert(1);
}

.control-button.active .icon[src] {
  // 激活状态保持主题色
  filter: brightness(0) saturate(100%) invert(0.2) sepia(1) saturate(5) hue-rotate(220deg);
}

// Dark theme icon adjustments
[data-theme='dark'] {
  .icon[src] {
    // 深色主题：纯白色图标
    filter: brightness(0) saturate(100%) invert(1);
  }

  .control-button:hover .icon[src] {
    // 悬停时保持纯白色
    filter: brightness(0) saturate(100%) invert(1);
  }

  .control-button.primary .icon[src] {
    // 主要按钮保持白色
    filter: brightness(0) saturate(100%) invert(1);
  }

  .control-button.active .icon[src] {
    // 激活状态保持主题色
    filter: brightness(0) saturate(100%) invert(0.9) sepia(1) saturate(5) hue-rotate(220deg);
  }
}

// Sidebar
.sidebar {
  grid-area: sidebar;
  background: var(--color-sidebar-bg);
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  transition: all var(--transition-normal);

  // 隐藏滚动条但保持滚动功能
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */

  &::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }

  // 收缩状态
  &.collapsed {
    // 保持原有的滚动功能，但优化滚动条显示
    overflow-y: auto;
    overflow-x: visible;

    .sidebar-content {
      padding: var(--spacing-sm);
    }

    .sidebar-title,
    .sidebar-text {
      opacity: 0;
      visibility: hidden;
      width: 0;
      overflow: hidden;
    }

    .sidebar-link,
    .sidebar-button {
      justify-content: center;
      padding: var(--spacing-sm);

      .sidebar-icon {
        margin-right: 0;
      }
    }

    // 收缩状态下的用户歌单区域样式
    #user-playlists-section {
      // 防止hover效果导致滚动条出现
      overflow: visible;

      .sidebar-title {
        display: none; // 隐藏"我的歌单"标题
      }

      // 歌单列表容器
      .user-playlists-list {
        // 确保列表容器不会因为hover效果产生滚动
        overflow: visible;
        padding: 0 var(--spacing-xs);
      }

      .playlist-sidebar-item {
        justify-content: center;
        padding: var(--spacing-xs);
        margin-bottom: var(--spacing-xs);

        // 隐藏文字内容
        .playlist-name,
        .playlist-count,
        .sidebar-playlist-actions {
          display: none;
        }

        // 封面图片样式调整
        .sidebar-playlist-cover {
          width: 32px;
          height: 32px;
          margin-right: 0;
          border-radius: var(--border-radius-md);
        }

        // 默认图标样式调整
        .sidebar-icon {
          width: 24px;
          height: 24px;
          margin-right: 0;
        }
      }
    }

    // 收缩状态下按钮居中显示
    .sidebar-toggle {
      right: 50%;
      transform: translateX(50%);
    }

    .sidebar-toggle-btn {
      .collapse-icon {
        display: none;
      }

      .expand-icon {
        display: block;
      }
    }
  }
}

// 侧边栏切换按钮
.sidebar-toggle {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-sm);
  z-index: 10;
  transition: all var(--transition-normal);
}

.sidebar-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);

  &:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-text);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .icon {
    width: 16px;
    height: 16px;
    transition: all var(--transition-fast);
    // 浅色主题：纯黑色图标
    filter: brightness(0) saturate(100%) invert(0);
  }

  &:hover .icon {
    // 悬停时保持纯黑色
    filter: brightness(0) saturate(100%) invert(0);
  }

  // 默认状态下的图标显示
  .collapse-icon {
    display: block;
  }

  .expand-icon {
    display: none;
  }
}

.sidebar-content {
  padding: var(--spacing-lg);
  padding-top: calc(var(--spacing-lg) + 48px); // 为切换按钮留出空间
  transition: all var(--transition-normal);
}

.sidebar-section {
  margin-bottom: var(--spacing-xl);
}

.sidebar-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--spacing-sm); // 减小标题与内容的间距，改善视觉层次
  transition: all var(--transition-normal);
}

.sidebar-menu {
  list-style: none;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  // 浅色主题：纯黑色文字
  color: #000000;
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
  margin-bottom: var(--spacing-xs);

  &:hover {
    background: var(--color-hover);
    // 悬停时保持纯黑色
    color: #000000;
  }

  &.active {
    background: var(--color-primary-bg);
    color: var(--color-primary);
    font-weight: 500;
  }
}

.sidebar-button {
  display: flex;
  align-items: center;
  //gap: var(--spacing-sm);
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  // 浅色主题：纯黑色文字
  color: #000000;
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);

  &:hover {
    background: var(--color-hover);
    // 悬停时保持纯黑色
    color: #000000;
  }
}

// 侧边栏图标和文字
.sidebar-icon {
  width: 20px;
  height: 20px;
  margin-right: var(--spacing-sm);
  fill: currentColor;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  // 浅色主题：纯黑色图标（非激活状态）
  filter: brightness(0) saturate(100%) invert(0);
}

// 激活状态的图标颜色优先级更高
.sidebar-link.active .sidebar-icon {
  // 浅色主题：激活状态使用蓝色主题色
  filter: brightness(0) saturate(100%) invert(0.2) sepia(1) saturate(5) hue-rotate(220deg) !important;
}

.sidebar-text {
  transition: all var(--transition-normal);
  white-space: nowrap;
  overflow: hidden;
}

// Main content
.main-content {
  grid-area: main;
  overflow-y: auto;
  background: var(--color-body-bg);

  // 歌单详情页面特殊处理，避免双滚动条
  .playlist-page {
    height: 100%;
    overflow: hidden; // 禁用内部滚动，使用外层滚动

    .tracks-section {
      .tracks-container {
        max-height: none; // 移除高度限制
        overflow: visible; // 禁用内部滚动
      }
    }
  }
}

.content-area {
  padding: var(--spacing-lg);
  min-height: 100%;
}

// Player
.player {
  grid-area: player;
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  height: 64px;
  backdrop-filter: saturate(180%) blur(30px);
  background-color: var(--color-navbar-bg);
  z-index: 100;
}

// Firefox fallback for backdrop-filter
@supports (-moz-appearance: none) {
  .player {
    background-color: var(--color-body-bg);
  }
}

// Progress bar at the top
.progress-bar {
  margin-top: -6px;
  margin-bottom: -6px;
  width: 100%;
}

.progress-bar-container {
  width: 100%;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.progress-track {
  position: relative;
  width: 100%;
  height: 2px;
  background: rgba(128, 128, 128, 0.18);
  border-radius: 15px;
  overflow: visible;
}

// Controls section
.controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 100%;
  padding: 0 10vw;
}

@media (max-width: 1336px) {
  .controls {
    padding: 0 5vw;
  }
}

.blank {
  flex-grow: 1;
}

// Left section: Track info
.playing {
  display: flex;
}

.playing .container {
  display: flex;
  align-items: center;
}

// Track info
.track-cover {
  height: 46px;
  width: 46px;
  border-radius: 5px;
  box-shadow: 0 6px 8px -2px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  user-select: none;
  object-fit: cover;
  transition: opacity var(--transition-normal);

  &.loading {
    opacity: 0.6;
    animation: pulse 1.5s ease-in-out infinite;
  }

  @keyframes pulse {
    0%, 100% {
      opacity: 0.6;
    }
    50% {
      opacity: 0.3;
    }
  }
}

.track-info {
  height: 46px;
  margin-left: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.track-name {
  font-weight: 600;
  font-size: 16px;
  opacity: 0.88;
  color: var(--color-text);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  word-break: break-all;
  cursor: pointer;

  &.has-list:hover {
    text-decoration: underline;
  }
}

.track-artist {
  font-size: 12px;
  opacity: 0.58;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  word-break: break-all;
  cursor: pointer;

  &:hover {
    text-decoration: underline;
  }
}

.like-button {
  margin-left: 16px;
}

// ButtonIcon component
.button-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
  background: transparent;
  margin: 4px;
  border-radius: 25%;
  transition: 0.2s;
  border: none;
  cursor: pointer;

  .icon {
    color: var(--color-text);
    height: 16px;
    width: 16px;
    // 浅色主题：纯黑色图标
    filter: brightness(0) saturate(100%) invert(0);
    transition: filter var(--transition-fast);
  }

  &:first-child {
    margin-left: 0;
  }

  &:hover {
    background: var(--color-secondary-bg-for-transparent, var(--color-hover));

    .icon {
      // 悬停时保持纯黑色
      filter: brightness(0) saturate(100%) invert(0);
    }
  }

  &:active {
    transform: scale(0.92);
  }

  &.active .icon {
    // 激活状态保持主题色
    filter: brightness(0) saturate(100%) invert(0.2) sepia(1) saturate(5) hue-rotate(220deg);
  }

  &.disabled {
    cursor: default;
    opacity: 0.38;

    &:hover {
      background: none;
    }

    &:active {
      transform: unset;
    }
  }
}

// 桌面歌词按钮特殊样式
#desktop-lyrics-btn {
  &.active {
    background: var(--color-primary-bg);

    .icon {
      filter: brightness(0) saturate(100%) invert(0.2) sepia(1) saturate(5) hue-rotate(220deg);
    }
  }

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;

    &:hover {
      background: transparent;
    }
  }
}

// Middle control buttons
.middle-control-buttons {
  display: flex;
}

.middle-control-buttons .container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 8px;

  .button-icon {
    margin: 0 8px;
  }

  .play {
    height: 42px;
    width: 42px;

    .icon {
      width: 24px;
      height: 24px;
    }
  }
}

// Right control buttons
.right-control-buttons {
  display: flex;
}

.right-control-buttons .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;

  .active .icon {
    filter: brightness(0) saturate(100%) invert(0.2) sepia(1) saturate(5) hue-rotate(220deg);
  }

  .volume-control {
    margin-left: 4px;
    display: flex;
    align-items: center;

    .volume-bar {
      width: 84px;
    }
  }
}

// Progress bar styles (updated for new structure)
.progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 15px;
  transition: width var(--transition-fast);
  width: 0%;
  position: relative;
}

.progress-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0.5px 0.5px 2px 1px rgba(0, 0, 0, 0.12);
  visibility: hidden;
  transition: visibility var(--transition-fast);
  left: 0%;
  cursor: pointer;
  z-index: 2;
}

// Show handle on hover or when dragging
.progress-bar-container:hover .progress-handle,
.progress-bar-container.dragging .progress-handle {
  visibility: visible;
}

// Progress tooltip
.progress-tooltip {
  position: absolute;
  bottom: 25px;
  left: 0;
  transform: translateX(-50%);
  background: #ffffff;
  color: #000000;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: var(--font-size-xs);
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0.5px 0.5px 2px 1px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
  z-index: 3;
}

.progress-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #ffffff;
}

.progress-bar-container.dragging .progress-tooltip {
  opacity: 1;
}

// Volume control
.volume-slider-container {
  width: 84px;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.volume-slider {
  position: relative;
  width: 100%;
  height: 2px;
  background: rgba(128, 128, 128, 0.18);
  border-radius: 15px;
  overflow: visible;
}

.volume-fill {
  height: 100%;
  background: var(--color-text);
  border-radius: 15px;
  transition: width var(--transition-fast), background-color var(--transition-fast);
  width: 70%;
  opacity: 0.8;
}

.volume-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0.5px 0.5px 2px 1px rgba(0, 0, 0, 0.12);
  visibility: hidden;
  transition: visibility var(--transition-fast);
  left: 70%;
  cursor: pointer;
  z-index: 2;
}

.volume-slider-container:hover .volume-handle {
  visibility: visible;
}

.volume-slider-container:hover .volume-fill {
  background: var(--color-primary);
  opacity: 1;
}

// Dark theme adjustments
[data-theme='dark'] {
  .button-icon .icon {
    // 深色主题：纯白色图标
    filter: brightness(0) saturate(100%) invert(1);
  }

  .button-icon:hover .icon {
    // 悬停时保持纯白色
    filter: brightness(0) saturate(100%) invert(1);
  }

  .button-icon.active .icon {
    // 激活状态保持主题色
    filter: brightness(0) saturate(100%) invert(0.9) sepia(1) saturate(5) hue-rotate(220deg);
  }

  // 桌面歌词按钮特殊样式
  #desktop-lyrics-btn {
    &.active {
      background: rgba(var(--color-primary-rgb), 0.2);

      .icon {
        filter: brightness(0) saturate(100%) invert(0.9) sepia(1) saturate(5) hue-rotate(220deg);
      }
    }

    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;

      &:hover {
        background: transparent;
      }
    }
  }

  // 全屏按钮深色主题样式
  .lyrics-fullscreen-button .fullscreen-btn .icon {
    // 深色主题：纯白色图标
    filter: brightness(0) saturate(100%) invert(1);
  }

  .lyrics-fullscreen-button .fullscreen-btn:hover .icon {
    // 悬停时保持纯白色
    filter: brightness(0) saturate(100%) invert(1);
  }

  // 歌词页面新控件深色主题样式
  .volume-control-section .volume-btn .icon,
  .playmode-control-section .playmode-btn .icon {
    filter: brightness(0) saturate(100%) invert(1);
  }

  .volume-control-section .volume-btn:hover .icon,
  .playmode-control-section .playmode-btn:hover .icon {
    filter: brightness(0) saturate(100%) invert(1);
  }

  .volume-slider::-webkit-slider-thumb {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }

  .volume-slider::-moz-range-thumb {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }

  .lyrics-progress-handle {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }

  // 歌词页面音量滑块在暗色主题下的样式
  .volume-control-section .volume-slider::-webkit-slider-thumb {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }

  .volume-control-section .volume-slider::-moz-range-thumb {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }

  .progress-handle,
  .volume-handle {
    background: #ffffff;
    box-shadow: 0.5px 0.5px 2px 1px rgba(0, 0, 0, 0.3);
  }

  .progress-tooltip {
    background: #2a2a2a;
    color: #ffffff;
    box-shadow: 0.5px 0.5px 2px 1px rgba(0, 0, 0, 0.3);
  }

  .progress-tooltip::after {
    border-top-color: #2a2a2a;
  }
}

// Playlist Panel
.playlist-panel {
  position: fixed;
  top: 64px;
  right: 0;
  bottom: 64px;
  width: 400px;
  background: var(--color-body-bg);
  border-left: 1px solid var(--color-border);
  backdrop-filter: saturate(180%) blur(30px);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-normal);

  &.show {
    transform: translateX(0);
  }
}

.playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-navbar-bg);
  backdrop-filter: saturate(180%) blur(30px);
}

.playlist-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.playlist-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);

  &:hover {
    background: var(--color-hover);
    color: var(--color-text);
  }

  .icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
  }
}

.playlist-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.playlist-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-secondary-bg);

  span {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
  }
}

.playlist-clear {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  cursor: pointer;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);

  &:hover {
    background: var(--color-hover);
    color: var(--color-text);
  }
}

.playlist-tracks {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-sm) 0;
}

.playlist-track {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  cursor: pointer;
  transition: background var(--transition-fast);

  &:hover {
    background: var(--color-hover);
  }

  &.current {
    background: var(--color-primary-bg);

    .playlist-track-title {
      color: var(--color-primary);
      font-weight: 600;
    }

    .playlist-track-number {
      color: var(--color-primary);
      font-weight: 600;
    }
  }

  &.playing {
    .playlist-track-number {
      color: var(--color-primary);
      font-weight: 600;
    }

    .playlist-track-title {
      color: var(--color-primary);
    }
  }
}

.playlist-track-number {
  width: 24px;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  text-align: center;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;

  .playing-icon {
    width: 14px;
    height: 14px;
    fill: var(--color-primary);
  }
}

.playlist-track-info {
  flex: 1;
  min-width: 0;
  margin-left: var(--spacing-sm);
}

.playlist-track-title {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.playlist-track-artist {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-track-duration {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
  margin-left: var(--spacing-sm);
}

.playlist-track-remove {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  opacity: 0;
  transition: all var(--transition-fast);
  margin-left: var(--spacing-sm);

  .icon {
    width: 12px;
    height: 12px;
    fill: currentColor;
  }

  &:hover {
    background: var(--color-hover);
    color: var(--color-text);
  }
}

.playlist-track:hover .playlist-track-remove {
  opacity: 1;
}

// Empty playlist state
.playlist-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--color-text-secondary);

  .icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
  }

  p {
    font-size: var(--font-size-md);
  }
}

// Context Menu
.context-menu {
  position: fixed;
  background: var(--color-body-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  backdrop-filter: saturate(180%) blur(30px);
  z-index: 1000;
  min-width: 180px;
  padding: var(--spacing-xs) 0;
  user-select: none;
}

.context-menu-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  cursor: pointer;
  transition: background var(--transition-fast);

  .icon {
    width: 16px;
    height: 16px;
    margin-right: var(--spacing-sm);
    fill: currentColor;
  }

  span {
    font-size: var(--font-size-sm);
    color: var(--color-text);
  }

  &:hover {
    background: var(--color-hover);
  }

  &.danger {
    color: var(--color-error);

    &:hover {
      background: rgba(var(--color-error-rgb), 0.1);
    }
  }
}

.context-menu-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--spacing-xs) 0;
}

/* 歌单封面右键菜单样式 */
.cover-context-menu {
  position: fixed;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-xs);
  min-width: 160px;
  z-index: 10000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  .context-menu-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: background var(--transition-fast);
    user-select: none;

    .menu-icon {
      width: 16px;
      height: 16px;
      margin-right: var(--spacing-sm);
      fill: currentColor;
      opacity: 0.7;
    }

    span {
      font-size: var(--font-size-sm);
      color: var(--color-text);
      font-weight: 500;
    }

    &:hover {
      background: var(--color-hover);

      .menu-icon {
        opacity: 1;
      }
    }

    &:active {
      background: var(--color-active);
    }
  }
}

/* 歌单封面样式增强 */
.playlist-cover {
  position: relative;
  cursor: pointer;
  transition: transform var(--transition-normal);

  &:hover {
    transform: scale(1.02);
  }

  .cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
  }

  .cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--color-surface-variant);
    border-radius: var(--border-radius-lg);
    border: 2px dashed var(--color-border);
    transition: all var(--transition-normal);

    .cover-icon {
      width: 48px;
      height: 48px;
      fill: var(--color-text-secondary);
      opacity: 0.5;
    }

    &:hover {
      border-color: var(--color-primary);
      background: var(--color-primary-container);

      .cover-icon {
        fill: var(--color-primary);
        opacity: 0.8;
      }
    }
  }
}

/* 侧边栏歌单封面样式 */
.sidebar-playlist-cover {
  width: 20px;
  height: 20px;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
  margin-right: var(--spacing-sm);
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

/* 收缩状态下的歌单项样式 */
.playlist-sidebar-item.collapsed-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-xs) auto;
  border-radius: var(--border-radius-md);
  position: relative;
  transition: all var(--transition-normal);
  // 防止hover时的缩放效果影响容器滚动
  transform-origin: center;
  overflow: visible;
  // 关键：确保元素不会因为hover效果而影响父容器的滚动计算
  contain: layout;

  &:hover {
    background: var(--color-hover);
    // 不使用transform缩放，改用box-shadow来实现视觉反馈
    box-shadow: 0 0 0 2px var(--color-primary-container);

    // 显示tooltip
    &::after {
      content: attr(title);
      position: absolute;
      left: calc(100% + var(--spacing-sm));
      top: 50%;
      transform: translateY(-50%);
      background: var(--color-surface);
      color: var(--color-text);
      padding: var(--spacing-xs) var(--spacing-sm);
      border-radius: var(--border-radius-sm);
      font-size: var(--font-size-xs);
      white-space: nowrap;
      box-shadow: var(--shadow-md);
      border: 1px solid var(--color-border);
      z-index: 1000;
      opacity: 1;
      pointer-events: none;
      // 确保tooltip不会影响父容器的滚动计算
      max-width: 200px;
      overflow: hidden;
      text-overflow: ellipsis;
      // 关键：确保tooltip不会影响父容器的尺寸计算
      width: max-content;
      max-width: 200px;
    }
  }

  .sidebar-playlist-cover {
    width: 32px;
    height: 32px;
    margin-right: 0;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
  }

  .sidebar-icon {
    width: 24px;
    height: 24px;
    margin-right: 0;
    fill: var(--color-text-secondary);
    transition: fill var(--transition-fast);
  }

  &:hover .sidebar-icon {
    fill: var(--color-primary);
  }

  // 隐藏tooltip的默认状态
  &::after {
    opacity: 0;
    transition: opacity var(--transition-fast);
  }
}

// Modal styles
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
}

.modal-dialog {
  background: var(--color-body-bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;

  &.modal-dialog-large {
    max-width: 800px;
    max-height: 85vh;
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
}

.modal-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);

  &:hover {
    background: var(--color-bg-hover);
  }

  .icon {
    width: 20px;
    height: 20px;
    fill: var(--color-text-secondary);
  }
}

.modal-body {
  padding: var(--spacing-lg);
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
}

// Form styles
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--spacing-sm);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-secondary);
  color: var(--color-text);
  font-size: var(--font-size-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;

  &:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
  }

  &::placeholder {
    color: var(--color-text-secondary);
  }
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.form-error {
  color: var(--color-error);
  font-size: var(--font-size-sm);
  margin-top: var(--spacing-xs);
}

// Button styles
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  background: none;

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
  }
}

.btn-primary {
  background: var(--color-primary);
  color: white;

  &:hover:not(:disabled) {
    background: var(--color-primary-hover);
  }
}

.btn-secondary {
  background: var(--color-bg-secondary);
  color: var(--color-text);
  border-color: var(--color-border);

  &:hover:not(:disabled) {
    background: var(--color-bg-hover);
  }
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);

  &:hover:not(:disabled) {
    background: var(--color-bg-hover);
  }
}

// Edit Track Info Dialog styles
#edit-track-info-dialog {
  .modal-dialog {
    max-width: 600px;
    width: 90vw;
  }
}

.track-info-form {
  .cover-section {
    margin-bottom: var(--spacing-xl);
  }

  .cover-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
  }

  .track-cover-preview {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 2px solid var(--color-border);
    background: var(--color-bg-secondary);
  }

  .cover-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .form-group {
    margin-bottom: var(--spacing-lg);

    &:last-child {
      margin-bottom: 0;
    }
  }

  .form-input {
    transition: all var(--transition-fast);

    &:focus {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.15);
    }
  }

  .form-error {
    color: var(--color-error);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
    display: none;

    &.show {
      display: block;
    }
  }
}

// Playlist selection list
.playlist-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: var(--spacing-md);
}

.playlist-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
  cursor: pointer;
  transition: all var(--transition-fast);

  &:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-primary);
  }

  &.selected {
    background: rgba(var(--color-primary-rgb), 0.1);
    border-color: var(--color-primary);
  }

  .playlist-icon {
    width: 20px;
    height: 20px;
    margin-right: var(--spacing-md);
    fill: var(--color-text-secondary);
  }

  .playlist-info {
    flex: 1;
  }

  .playlist-name {
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
  }

  .playlist-count {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
  }
}

.create-new-playlist-option {
  border-top: 1px solid var(--color-border);
  padding-top: var(--spacing-md);
}

// Music Library Selection Dialog
.library-selection-header {
  margin-bottom: var(--spacing-lg);

  .search-container {
    position: relative;
    margin-bottom: var(--spacing-md);

    .form-input {
      padding-right: 40px;
    }

    .search-icon {
      position: absolute;
      right: var(--spacing-md);
      top: 50%;
      transform: translateY(-50%);
      width: 18px;
      height: 18px;
      fill: var(--color-text-secondary);
      pointer-events: none;
    }
  }

  .selection-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);

    .selection-count {
      font-size: var(--font-size-sm);
      color: var(--color-text-secondary);
      margin-left: auto;

      #selected-count {
        font-weight: 600;
        color: var(--color-primary);
      }
    }
  }
}

.library-track-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-secondary);
}

.library-track-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition-fast);

  &:last-child {
    border-bottom: none;
  }

  &:hover {
    background: var(--color-bg-hover);
  }

  &.selected {
    background: rgba(var(--color-primary-rgb), 0.1);
    border-color: var(--color-primary);
  }

  .track-checkbox {
    width: 18px;
    height: 18px;
    margin-right: var(--spacing-md);
    accent-color: var(--color-primary);
    cursor: pointer;
  }

  .track-info {
    flex: 1;
    min-width: 0;

    .track-title {
      font-weight: 500;
      color: var(--color-text);
      margin-bottom: var(--spacing-xs);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .track-meta {
      font-size: var(--font-size-sm);
      color: var(--color-text-secondary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }

  .track-duration {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-left: var(--spacing-md);
    min-width: 50px;
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
}

.library-empty-state {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--color-text-secondary);

  .empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--spacing-md) auto;
    opacity: 0.5;
    fill: var(--color-text-secondary);
  }

  h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
  }

  p {
    font-size: var(--font-size-base);
    line-height: 1.5;
  }
}

// User playlists in sidebar
#user-playlists-section {
  .sidebar-menu {
    max-height: 300px;
    overflow-y: auto;
  }
}

.playlist-sidebar-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-xs) var(--spacing-md); // 减小垂直内边距，使歌单列表更紧凑
  color: var(--color-text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
  margin-bottom: 2px; // 添加小间距分隔歌单项

  &:hover {
    background: var(--color-bg-hover);
    color: var(--color-text);

    .sidebar-playlist-actions {
      opacity: 1;
    }
  }

  &.active {
    background: var(--color-primary-bg);
    color: var(--color-primary);

    .sidebar-icon {
      fill: var(--color-primary);
    }

    // 确保封面图片在激活状态下仍然可见，但不显示边框
    .sidebar-playlist-cover {
      opacity: 1;
      // 移除边框以保持简洁的视觉效果
    }
  }

  .sidebar-icon {
    width: 18px;
    height: 18px;
    margin-right: var(--spacing-md);
    fill: var(--color-text-secondary);
    transition: fill var(--transition-fast);
  }

  .playlist-name {
    flex: 1;
    font-size: var(--font-size-sm);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0; // 确保flex项目可以正确收缩
  }

  .playlist-count {
    font-size: var(--font-size-xs);
    opacity: 0.7;
    margin-left: var(--spacing-sm);
    flex-shrink: 0; // 防止歌曲数量被压缩
    min-width: 20px; // 确保数量显示有足够空间
    text-align: right; // 右对齐数量显示
  }

  // 侧边栏歌单操作按钮区域 - 独立样式避免与歌单详情页面冲突
  .sidebar-playlist-actions {
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 2px; // 减小按钮间距，使布局更紧凑
    margin-left: var(--spacing-xs); // 减小左边距
    flex-shrink: 0; // 防止操作按钮被压缩
    transition: opacity var(--transition-fast);
  }

  .sidebar-playlist-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px; // 使用固定像素值确保一致的按钮尺寸
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
    display: flex; // 确保图标居中对齐
    align-items: center;
    justify-content: center;
    width: 24px; // 固定宽度确保对齐
    height: 24px; // 固定高度确保对齐

    &:hover {
      background: rgba(var(--color-text-rgb), 0.1); // 使用主题色变量
    }

    .icon {
      width: 14px;
      height: 14px;
      fill: currentColor;
    }
  }
}

// Playlist context menu
.playlist-context-menu {
  position: fixed;
  background: var(--color-body-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  backdrop-filter: saturate(180%) blur(30px);
  z-index: 1000;
  min-width: 150px;
  padding: var(--spacing-xs) 0;
  user-select: none;
}

.playlist-context-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  cursor: pointer;
  transition: background var(--transition-fast);
  font-size: var(--font-size-sm);

  &:hover {
    background: var(--color-bg-hover);
  }

  .icon {
    width: 16px;
    height: 16px;
    margin-right: var(--spacing-sm);
    fill: var(--color-text-secondary);
  }

  &.danger {
    color: var(--color-error);

    .icon {
      fill: var(--color-error);
    }

    &:hover {
      background: rgba(var(--color-error-rgb), 0.1);
    }
  }
}

// Enhanced Playlist Page Design - Consistent with App Style
.playlist-page {
  // Inherits from .page-content styles

  // Enhanced Hero Section - Matches RecentPage style
  .hero-section {
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    color: white;
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    position: relative;
    overflow: hidden;

    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: var(--gradient-overlay);
      opacity: 0.1;
    }

    .hero-content {
      position: relative;
      z-index: 1;

      .hero-main {
        display: flex;
        align-items: flex-end;
        gap: var(--spacing-xl);
      }
    }

    .playlist-cover {
      flex-shrink: 0;
      width: 240px;
      height: 240px;
      background: rgba(255, 255, 255, 0.15);
      border-radius: var(--radius-lg);
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.2);

      .cover-icon {
        width: 96px;
        height: 96px;
        fill: rgba(255, 255, 255, 0.9);
        filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
      }
    }

    .playlist-info {
      flex: 1;
      min-width: 0;

      .playlist-type {
        display: inline-flex;
        align-items: center;
        gap: var(--spacing-xs);
        font-size: var(--font-size-sm);
        font-weight: 600;
        color: rgba(255, 255, 255, 0.9);
        text-transform: uppercase;
        letter-spacing: 0.8px;
        margin-bottom: var(--spacing-md);
        background: rgba(255, 255, 255, 0.1);
        padding: var(--spacing-xs) var(--spacing-md);
        border-radius: var(--radius-full);
        backdrop-filter: blur(10px);

        .type-icon {
          width: 16px;
          height: 16px;
          fill: currentColor;
        }
      }

      .playlist-title {
        font-size: 3.5rem;
        font-weight: 900;
        color: white;
        margin: 0 0 var(--spacing-md) 0;
        line-height: 1.1;
        word-break: break-word;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
      }

      .playlist-description {
        font-size: var(--font-size-lg);
        color: rgba(255, 255, 255, 0.9);
        line-height: 1.6;
        margin: 0 0 var(--spacing-lg) 0;
        max-width: 600px;
        opacity: 0.95;
      }

      .playlist-meta {
        display: flex;
        align-items: center;
        gap: var(--spacing-lg);
        flex-wrap: wrap;

        .meta-item {
          display: flex;
          align-items: center;
          gap: var(--spacing-xs);
          font-size: var(--font-size-md);
          color: rgba(255, 255, 255, 0.9);
          font-weight: 500;
          background: rgba(255, 255, 255, 0.1);
          padding: var(--spacing-sm) var(--spacing-md);
          border-radius: var(--radius-md);
          backdrop-filter: blur(10px);

          .meta-icon {
            width: 16px;
            height: 16px;
            fill: currentColor;
            opacity: 0.9;
          }
        }
      }
    }
  }
}

// Enhanced Action Buttons - Consistent with App Style
.playlist-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-xl);
  gap: var(--spacing-lg);

  .actions-main {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
  }

  .actions-extra {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
  }

  .action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;

    .icon {
      width: 18px;
      height: 18px;
      fill: currentColor;
    }

    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    // Primary button - matches RecentPage style
    &.primary {
      background: var(--color-primary);
      color: white;
      box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.2);

      &:hover:not(:disabled) {
        background: rgba(var(--color-primary-rgb), 0.9);
        transform: translateY(-1px);
        box-shadow: 0 4px 16px rgba(var(--color-primary-rgb), 0.3);
      }

      &:active {
        transform: translateY(0);
      }
    }

    // Secondary button - circular design
    &.secondary {
      background: var(--color-secondary-bg);
      color: var(--color-text);
      padding: var(--spacing-md);
      border-radius: 50%;
      width: 48px;
      height: 48px;
      justify-content: center;

      &:hover:not(:disabled) {
        background: var(--color-hover);
        transform: scale(1.05);
      }

      .icon {
        width: 20px;
        height: 20px;
      }
    }

    // Outline button
    &.outline {
      background: transparent;
      color: var(--color-text);
      border: 1px solid var(--color-border);

      &:hover:not(:disabled) {
        background: var(--color-secondary-bg);
        border-color: var(--color-primary);
        color: var(--color-primary);
        transform: translateY(-1px);
      }

      &.danger:hover:not(:disabled) {
        border-color: var(--color-danger);
        color: var(--color-danger);
        background: rgba(var(--color-error-rgb), 0.05);
      }
    }

    // Ghost button
    &.ghost {
      background: transparent;
      color: var(--color-text-secondary);
      border: none;

      &:hover:not(:disabled) {
        background: var(--color-hover);
        color: var(--color-text);
      }
    }
  }
}

// Track Section - Clean and Modern
.track-section {
  .track-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);

    .track-title {
      display: flex;
      align-items: center;
      gap: var(--spacing-md);

      h3 {
        font-size: var(--font-size-xl);
        font-weight: 700;
        margin: 0;
        color: var(--color-text);
      }

      .track-badge {
        background: var(--color-primary-bg);
        color: var(--color-primary);
        padding: var(--spacing-xs) var(--spacing-sm);
        border-radius: var(--radius-md);
        font-size: var(--font-size-sm);
        font-weight: 700;
        min-width: 24px;
        text-align: center;
      }
    }

    .track-controls {
      display: flex;
      align-items: center;
      gap: var(--spacing-sm);

      .control-btn {
        background: none;
        border: none;
        color: var(--color-text-secondary);
        font-size: var(--font-size-sm);
        font-weight: 500;
        padding: var(--spacing-xs) var(--spacing-sm);
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: all var(--transition-fast);

        &:hover {
          background: var(--color-hover);
          color: var(--color-text);
        }
      }
    }
  }

  .track-list {
    background: var(--color-body-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }
}

// Empty playlist state - Modern Design
.playlist-empty-state {
  padding: var(--spacing-xl) var(--spacing-lg);
  text-align: center;

  .empty-content {
    max-width: 400px;
    margin: 0 auto;

    .empty-icon {
      width: 80px;
      height: 80px;
      margin: 0 auto var(--spacing-xl) auto;
      fill: var(--color-text-secondary);
      opacity: 0.4;
    }

    h3 {
      font-size: var(--font-size-xl);
      font-weight: 700;
      margin: 0 0 var(--spacing-md) 0;
      color: var(--color-text);
    }

    p {
      font-size: var(--font-size-base);
      color: var(--color-text-secondary);
      margin: 0 0 var(--spacing-xl) 0;
      line-height: 1.6;
      opacity: 0.8;
    }

    .action-btn {
      margin-top: var(--spacing-md);

      &.primary {
        padding: var(--spacing-md) var(--spacing-xl);
        font-size: var(--font-size-base);
      }
    }
  }
}

// Track list header
.track-list-header-row {
  display: grid;
  grid-template-columns: 60px 1fr 200px 80px;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;

  .track-header-number {
    text-align: center;
  }

  .track-header-duration {
    display: flex;
    align-items: center;
    justify-content: center;

    .duration-icon {
      width: 16px;
      height: 16px;
      fill: currentColor;
    }
  }
}

// Simple & Clean Tracks Section
.tracks-section {
  .tracks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);

    .tracks-title {
      font-size: var(--font-size-lg);
      font-weight: 600;
      color: var(--color-text);
      margin: 0;

      .tracks-count {
        font-weight: 400;
        color: var(--color-text-secondary);
      }
    }

    .tracks-controls {
      display: flex;
      gap: var(--spacing-sm);

      .control-btn {
        padding: var(--spacing-sm) var(--spacing-md);
        background: transparent;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-sm);
        font-size: var(--font-size-sm);
        color: var(--color-text-secondary);
        cursor: pointer;
        transition: all var(--transition-fast);

        &:hover {
          background: var(--color-secondary-bg);
          color: var(--color-text);
        }
      }
    }
  }

  .tracks-container {
    background: var(--color-body-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: visible; // 确保不产生内部滚动条
    overflow: hidden;
  }
}

// Clean Table Design for Tracks
.tracks-table {
  .table-header {
    display: grid;
    grid-template-columns: 60px 1fr 200px 80px 100px;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--color-secondary-bg);
    border-bottom: 1px solid var(--color-border);

    .th {
      font-size: var(--font-size-sm);
      font-weight: 600;
      color: var(--color-text-secondary);
      text-transform: uppercase;
      letter-spacing: 0.5px;

      &.th-number {
        text-align: center;
      }

      &.th-duration {
        text-align: center;
      }
    }
  }

  .table-body {
    .track-row {
      display: grid;
      grid-template-columns: 60px 1fr 200px 80px 100px;
      gap: var(--spacing-md);
      padding: var(--spacing-md) var(--spacing-lg);
      border-bottom: 1px solid var(--color-border);
      cursor: pointer;
      transition: background var(--transition-fast);
      align-items: center;

      &:last-child {
        border-bottom: none;
      }

      &:hover {
        background: var(--color-hover);

        .td-actions .track-actions {
          opacity: 1;
        }
      }

      &.selected {
        background: rgba(var(--color-primary-rgb), 0.1);

        .track-name {
          color: var(--color-primary);
          font-weight: 600;
        }
      }

      &.playing {
        background: rgba(var(--color-primary-rgb), 0.05);

        .track-name {
          color: var(--color-primary);
        }

        .track-number {
          color: var(--color-primary);
        }
      }
    }
  }
}

// Table Cell Styles
.td {
  display: flex;
  align-items: center;
  min-width: 0;

  &.td-number {
    justify-content: center;

    .track-number {
      font-size: var(--font-size-sm);
      color: var(--color-text-secondary);
      font-variant-numeric: tabular-nums;
      font-weight: 500;
    }
  }

  &.td-title {
    min-width: 0;

    .track-info {
      min-width: 0;
      width: 100%;
    }

    .track-name {
      font-size: var(--font-size-md);
      font-weight: 500;
      color: var(--color-text);
      margin-bottom: var(--spacing-xs);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: color var(--transition-fast);
    }

    .track-artist {
      font-size: var(--font-size-sm);
      color: var(--color-text-secondary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: color var(--transition-fast);

      &:hover {
        color: var(--color-text);
        text-decoration: underline;
        cursor: pointer;
      }
    }
  }

  &.td-album {
    .album-name {
      font-size: var(--font-size-sm);
      color: var(--color-text-secondary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: color var(--transition-fast);

      &:hover {
        color: var(--color-text);
        text-decoration: underline;
        cursor: pointer;
      }
    }
  }

  &.td-duration {
    justify-content: center;

    .duration {
      font-size: var(--font-size-sm);
      color: var(--color-text-secondary);
      font-variant-numeric: tabular-nums;
      font-weight: 500;
    }
  }

  &.td-actions {
    justify-content: flex-end;

    .track-actions {
      display: flex;
      align-items: center;
      gap: var(--spacing-xs);
      opacity: 0;
      transition: opacity var(--transition-fast);

      .action-btn {
        background: none;
        border: none;
        color: var(--color-text-secondary);
        cursor: pointer;
        padding: var(--spacing-xs);
        border-radius: 50%;
        transition: all var(--transition-fast);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;

        &:hover {
          background: var(--color-hover);
          color: var(--color-text);
        }

        &.action-btn-danger:hover {
          background: rgba(220, 38, 38, 0.1);
          color: #dc2626;
        }

        .icon {
          width: 16px;
          height: 16px;
          fill: currentColor;
        }
      }
    }
  }
}

.icon {
  width: 14px;
  height: 14px;
  margin-left: 2px;
}


.track-main-info {
  min-width: 0;

  .track-title {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
  }

  .track-artist {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;

    &:hover {
      color: var(--color-text);
      text-decoration: underline;
    }
  }
}

.track-album {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  &:hover {
    color: var(--color-text);
    text-decoration: underline;
  }
}

.track-duration {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.track-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  opacity: 0;
  transition: opacity var(--transition-fast);

  .track-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);

    &:hover {
      background: var(--color-bg-hover);
      color: var(--color-text);
      transform: scale(1.1);
    }

    &.track-remove-btn:hover {
      color: var(--color-danger);
    }

    .icon {
      width: 16px;
      height: 16px;
    }
  }
}


// 现代化歌单Hero区域样式
.playlist-hero {
  position: relative;
  padding: var(--spacing-xl) var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(135deg,
          rgba(var(--color-primary-rgb), 0.1) 0%,
          rgba(var(--color-primary-rgb), 0.05) 50%,
          transparent 100%);

  // 预加载优化，减少样式变换
  opacity: 1;
  transform: translateZ(0); // 启用硬件加速
  will-change: auto;

  .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;

    .gradient-overlay {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg,
              rgba(var(--color-primary-rgb), 0.08) 0%,
              rgba(var(--color-primary-rgb), 0.03) 50%,
              transparent 100%);
      backdrop-filter: blur(1px);
    }
  }

  .hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    gap: var(--spacing-xl);
  }

  .playlist-cover-container {
    flex-shrink: 0;

    .playlist-cover {
      position: relative;
      width: 240px;
      height: 240px;
      border-radius: var(--radius-lg);
      overflow: hidden;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
      transition: transform var(--transition-normal), box-shadow var(--transition-normal);

      &:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
      }

      .cover-placeholder {
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg,
                var(--color-secondary-bg) 0%,
                var(--color-border) 100%);
        display: flex;
        align-items: center;
        justify-content: center;

        .cover-icon {
          width: 80px;
          height: 80px;
          fill: var(--color-text-secondary);
          opacity: 0.6;
        }
      }

      .cover-shadow {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(180deg,
                transparent 0%,
                rgba(0, 0, 0, 0.1) 100%);
        pointer-events: none;
      }
    }
  }

  .playlist-info {
    flex: 1;
    min-width: 0;

    .playlist-type {
      display: flex;
      align-items: center;
      gap: var(--spacing-xs);
      margin-bottom: var(--spacing-sm);
      font-size: var(--font-size-sm);
      font-weight: 600;
      color: var(--color-text-secondary);
      text-transform: uppercase;
      letter-spacing: 0.5px;

      .type-icon {
        width: 16px;
        height: 16px;
        fill: currentColor;
      }
    }

    .playlist-title {
      font-size: 3.5rem;
      font-weight: 800;
      color: var(--color-text);
      margin: 0 0 var(--spacing-md) 0;
      line-height: 1.1;
      letter-spacing: -0.02em;
    }

    .playlist-description {
      font-size: var(--font-size-md);
      color: var(--color-text-secondary);
      line-height: 1.6;
      margin: 0 0 var(--spacing-lg) 0;
      max-width: 600px;
    }

    .playlist-meta {
      display: flex;
      align-items: center;
      gap: var(--spacing-lg);
      flex-wrap: wrap;

      .meta-item {
        display: flex;
        align-items: center;
        gap: var(--spacing-xs);
        font-size: var(--font-size-sm);
        color: var(--color-text-secondary);
        font-weight: 500;

        .meta-icon {
          width: 16px;
          height: 16px;
          fill: currentColor;
          opacity: 0.8;
        }
      }
    }
  }
}

// 现代化操作按钮区域样式 - 简化视觉层次
.playlist-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-md) 0; // 减少内边距，移除左右边距
  // 移除背景色和边框，消除视觉分割感

  .actions-primary {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);

    .play-btn {
      display: flex;
      align-items: center;
      gap: var(--spacing-sm);
      padding: var(--spacing-sm) var(--spacing-lg); // 减小垂直内边距
      background: var(--color-primary);
      color: white;
      border: none;
      border-radius: var(--radius-lg); // 使用适度圆角替代完全圆角
      font-weight: 600;
      font-size: var(--font-size-sm); // 减小字体大小
      cursor: pointer;
      transition: all var(--transition-fast);
      box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.2);

      &:hover:not(:disabled) {
        background: rgba(var(--color-primary-rgb), 0.8);
        transform: translateY(-1px);
        box-shadow: 0 4px 16px rgba(var(--color-primary-rgb), 0.3);
        color: white; // 确保悬停时文字保持白色
      }

      &:active {
        transform: translateY(0);
      }

      &:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
      }

      .btn-content {
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
      }

      .play-icon {
        width: 20px;
        height: 20px;
        fill: currentColor;
      }
    }

    .shuffle-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 40px; // 减小按钮尺寸
      height: 40px;
      background: var(--color-secondary-bg);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg); // 与播放按钮保持一致的圆角设计
      cursor: pointer;
      transition: all var(--transition-fast);

      &:hover:not(:disabled) {
        background: var(--color-hover);
        border-color: var(--color-primary);
        transform: scale(1.05);
      }

      &:active {
        transform: scale(0.95);
      }

      &:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
      }

      .shuffle-icon {
        width: 18px; // 减小图标尺寸以匹配按钮
        height: 18px;
        fill: var(--color-text-secondary);
        transition: fill var(--transition-fast);
      }

      &:hover:not(:disabled) .shuffle-icon {
        fill: var(--color-primary);
      }
    }
  }

  .actions-secondary {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);

    .action-btn {
      display: flex;
      align-items: center;
      gap: var(--spacing-sm);
      padding: var(--spacing-sm) var(--spacing-md);
      background: var(--color-body-bg);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-md);
      color: var(--color-text);
      font-size: var(--font-size-sm);
      font-weight: 500;
      cursor: pointer;
      transition: all var(--transition-fast);

      &:hover {
        background: var(--color-hover);
        border-color: var(--color-primary);
      }

      .icon {
        width: 16px;
        height: 16px;
        fill: currentColor;
      }
    }

    .action-menu {
      position: relative;

      .menu-trigger {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
        border-radius: var(--radius-full);
      }

      .menu-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        margin-top: var(--spacing-xs);
        background: var(--color-body-bg);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
        min-width: 160px;
        z-index: 100;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: all var(--transition-fast);

        &.show {
          opacity: 1;
          visibility: visible;
          transform: translateY(0);
        }

        .menu-item {
          display: flex;
          align-items: center;
          gap: var(--spacing-sm);
          width: 100%;
          padding: var(--spacing-sm) var(--spacing-md);
          background: none;
          border: none;
          color: var(--color-text);
          font-size: var(--font-size-sm);
          text-align: left;
          cursor: pointer;
          transition: background var(--transition-fast);

          &:hover:not(:disabled) {
            background: var(--color-hover);
          }

          &:disabled {
            opacity: 0.5;
            cursor: not-allowed;
          }

          .menu-icon {
            width: 16px;
            height: 16px;
            fill: currentColor;
          }
        }
      }
    }
  }
}

// 现代化歌曲列表样式
.tracks-section {
  .tracks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    padding: 0 var(--spacing-sm);

    .header-left {
      display: flex;
      align-items: baseline;
      gap: var(--spacing-md);

      .tracks-title {
        font-size: var(--font-size-xl);
        font-weight: 700;
        color: var(--color-text);
        margin: 0;
      }

      .tracks-count {
        font-size: var(--font-size-sm);
        color: var(--color-text-secondary);
        font-weight: 500;
      }
    }

    .header-right {
      .tracks-controls {
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);

        .control-btn {
          display: flex;
          align-items: center;
          gap: var(--spacing-xs);
          padding: var(--spacing-xs) var(--spacing-sm);
          background: var(--color-body-bg);
          border: 1px solid var(--color-border);
          border-radius: var(--radius-sm);
          color: var(--color-text-secondary);
          font-size: var(--font-size-xs);
          font-weight: 500;
          cursor: pointer;
          transition: all var(--transition-fast);

          &:hover {
            background: var(--color-hover);
            color: var(--color-text);
            border-color: var(--color-primary);
          }

          .icon {
            width: 14px;
            height: 14px;
            fill: currentColor;
          }
        }
      }
    }
  }

  .modern-tracks-table {
    background: var(--color-body-bg);
    border-radius: var(--radius-lg);
    overflow: visible; // 避免内部滚动条
    border: 1px solid var(--color-border);

    // 样式预加载优化
    transform: translateZ(0);
    will-change: auto;

    .tracks-table-header {
      display: grid;
      grid-template-columns: 60px 1fr 200px 80px 120px;
      gap: var(--spacing-md);
      padding: var(--spacing-md) var(--spacing-lg);
      background: var(--color-secondary-bg);
      border-bottom: 1px solid var(--color-border);
    }

    // 带封面的表格布局
    &.with-covers {
      .tracks-table-header {
        grid-template-columns: 60px 60px 1fr 200px 80px 120px;
      }

      .tracks-table-body .track-row {
        grid-template-columns: 60px 60px 1fr 200px 80px 120px;
      }
    }

    .header-cell {
      font-size: var(--font-size-xs);
      font-weight: 600;
      color: var(--color-text-secondary);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      display: flex;
      align-items: center;

      &.cell-number {
        justify-content: center;
      }

      &.cell-duration {
        justify-content: center;

        .duration-icon {
          width: 16px;
          height: 16px;
          fill: currentColor;
        }
      }

      &.cell-actions {
        justify-content: center;
      }

      &.cell-cover {
        justify-content: center;
      }
    }
  }

  .tracks-table-body {
    .track-row {
      display: grid;
      grid-template-columns: 60px 1fr 200px 80px 120px;
      gap: var(--spacing-md);
      padding: var(--spacing-md) var(--spacing-lg);
      border-bottom: 1px solid var(--color-border);
      cursor: pointer;
      transition: all var(--transition-fast);
      position: relative;

      &:last-child {
        border-bottom: none;
      }

      &:hover {
        background: var(--color-hover);

        .track-number-container .track-number {
          opacity: 0;
        }

        .track-number-container .play-indicator {
          opacity: 1;
        }

        .track-actions {
          opacity: 1;
        }
      }

      &.selected {
        background: rgba(var(--color-primary-rgb), 0.1);
        border-color: var(--color-primary);
      }

      &.playing {
        background: rgba(var(--color-primary-rgb), 0.15);

        .track-name {
          color: var(--color-primary);
          font-weight: 600;
        }

        .track-number-container .track-number {
          opacity: 0;
        }

        .track-number-container .play-indicator {
          opacity: 1;

          .play-icon {
            fill: var(--color-primary);
          }
        }
      }

      .track-cell {
        display: flex;
        align-items: center;
        min-width: 0;

        &.cell-number {
          justify-content: center;

          .track-number-container {
            position: relative;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;

            .track-number {
              font-size: var(--font-size-sm);
              color: var(--color-text-secondary);
              font-weight: 500;
              transition: opacity var(--transition-fast);
            }

            .play-indicator {
              position: absolute;
              top: 0;
              left: 0;
              right: 0;
              bottom: 0;
              display: flex;
              align-items: center;
              justify-content: center;
              opacity: 0;
              transition: opacity var(--transition-fast);

              .play-icon {
                width: 16px;
                height: 16px;
                fill: var(--color-text);
              }
            }
          }
        }

        &.cell-title {
          .track-main-info {
            min-width: 0;
            flex: 1;

            .track-name {
              font-size: var(--font-size-md);
              font-weight: 500;
              color: var(--color-text);
              margin-bottom: 2px;
              white-space: nowrap;
              overflow: hidden;
              text-overflow: ellipsis;
            }

            .track-artist {
              font-size: var(--font-size-sm);
              color: var(--color-text-secondary);
              white-space: nowrap;
              overflow: hidden;
              text-overflow: ellipsis;
            }
          }
        }

        &.cell-album {
          .album-name {
            font-size: var(--font-size-sm);
            color: var(--color-text-secondary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }
        }

        &.cell-duration {
          justify-content: center;

          .duration-text {
            font-size: var(--font-size-sm);
            color: var(--color-text-secondary);
            font-variant-numeric: tabular-nums;
          }
        }

        &.cell-cover {
          justify-content: center;
          align-items: center;

          .track-cover {
            width: 40px;
            height: 40px;
            border-radius: var(--radius-sm);
            object-fit: cover;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            transition: all var(--transition-fast);

            &:hover {
              transform: scale(1.05);
              box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            }
          }
        }

        &.cell-actions {
          justify-content: center;

          .track-actions {
            display: flex;
            align-items: center;
            gap: var(--spacing-xs);
            opacity: 0.6; // 正常状态下显示适当透明度，确保可见性
            transition: opacity var(--transition-fast);

            .track-action-btn {
              display: flex;
              align-items: center;
              justify-content: center;
              width: 32px;
              height: 32px;
              background: none;
              border: none;
              border-radius: var(--radius-sm);
              cursor: pointer;
              transition: all var(--transition-fast);

              .icon {
                width: 16px;
                height: 16px;
                fill: var(--color-text); // 使用主文本颜色，提高可见性
                transition: fill var(--transition-fast);
              }

              &:hover {
                background: var(--color-secondary-bg);

                .icon {
                  fill: var(--color-text);
                }
              }

              &.like-btn:hover .icon {
                fill: #e53e3e;
              }

              &.remove-btn:hover {
                background: rgba(229, 62, 62, 0.1);

                .icon {
                  fill: #e53e3e;
                }
              }
            }
          }
        }
      }
    }
  }
}

// 空状态样式
.tracks-empty-state {
  padding: var(--spacing-xl) var(--spacing-lg);
  text-align: center;

  .empty-content {
    max-width: 400px;
    margin: 0 auto;

    .empty-illustration {
      margin-bottom: var(--spacing-lg);

      .empty-icon {
        width: 64px;
        height: 64px;
        fill: var(--color-text-secondary);
        opacity: 0.6;
      }
    }

    .empty-title {
      font-size: var(--font-size-lg);
      font-weight: 600;
      color: var(--color-text);
      margin: 0 0 var(--spacing-sm) 0;
    }

    .empty-description {
      font-size: var(--font-size-md);
      color: var(--color-text-secondary);
      line-height: 1.5;
      margin: 0;
    }
  }
}


// 增强的空状态设计
.playlist-empty-state {
  padding: var(--spacing-xl) var(--spacing-lg);
  text-align: center;
  background: var(--color-secondary-bg);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--color-border);

  .empty-content {
    max-width: 500px;
    margin: 0 auto;

    .empty-illustration {
      position: relative;
      margin-bottom: var(--spacing-xl);
      display: inline-block;

      .empty-icon {
        width: 80px;
        height: 80px;
        fill: var(--color-primary);
        opacity: 0.8;
        animation: float 4s ease-in-out infinite; // 延长动画时间减少频率
        will-change: transform; // 提示浏览器优化此元素
      }

      .empty-waves {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 80px; // 减小波浪范围
        height: 80px;

        .wave {
          position: absolute;
          top: 50%;
          left: 50%;
          width: 40px; // 固定初始大小
          height: 40px;
          border: 1px solid var(--color-primary); // 减少边框宽度
          border-radius: 50%;
          transform: translate(-50%, -50%);
          opacity: 0;
          animation: wave 3s ease-out infinite; // 延长动画时间，使用ease-out
          will-change: transform, opacity; // 优化性能

          &.wave-1 {
            animation-delay: 0s;
          }

          &.wave-2 {
            animation-delay: 1s; // 增加延迟间隔
          }

          &.wave-3 {
            animation-delay: 2s;
          }
        }
      }
    }

    .empty-title {
      font-size: var(--font-size-xl);
      font-weight: 700;
      color: var(--color-text);
      margin: 0 0 var(--spacing-md) 0;
    }

    .empty-description {
      font-size: var(--font-size-md);
      color: var(--color-text-secondary);
      line-height: 1.6;
      margin: 0 0 var(--spacing-xl) 0;
    }

    .empty-action-btn {
      display: inline-flex;
      align-items: center;
      gap: var(--spacing-sm);
      padding: var(--spacing-md) var(--spacing-xl);
      background: var(--color-primary);
      color: white;
      border: none;
      border-radius: var(--radius-lg); // 使用更适中的圆角
      font-weight: 600;
      font-size: var(--font-size-md);
      cursor: pointer;
      transition: all var(--transition-fast);
      box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.2);

      &:hover {
        background: rgba(var(--color-primary-rgb), 0.8);
        transform: translateY(-1px);
        box-shadow: 0 4px 16px rgba(var(--color-primary-rgb), 0.3);
        color: white; // 确保悬停时文字保持白色
      }

      &:active {
        transform: translateY(0);
      }

      .icon {
        width: 20px;
        height: 20px;
        fill: currentColor;
      }
    }
  }
}

// 优化的动画效果 - 减少性能开销
@keyframes float {
  0%, 100% {
    transform: translate3d(0, 0, 0); // 使用3D变换启用硬件加速
  }
  50% {
    transform: translate3d(0, -8px, 0); // 减少移动距离
  }
}

@keyframes wave {
  0% {
    transform: scale(0);
    opacity: 0.8;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    transform: scale(1.5); // 使用scale代替width/height变化
    opacity: 0;
  }
}

// 在用户偏好减少动画时禁用动画以提升性能
@media (prefers-reduced-motion: reduce) {
  .playlist-empty-state {
    .empty-illustration {
      .empty-icon {
        animation: none;
      }

      .empty-waves .wave {
        animation: none;
        opacity: 0;
      }
    }
  }

  // 禁用所有页面动画
  .playlist-page,
  .playlist-hero,
  .playlist-actions,
  .tracks-section {
    animation: none;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

// 页面加载动画
.playlist-page {
  animation: fadeInUp 0.6s ease-out;
}

.playlist-hero {
  animation: fadeInUp 0.8s ease-out;

  .playlist-cover-container {
    animation: fadeInLeft 1s ease-out 0.2s both;
  }

  .playlist-info {
    animation: fadeInRight 1s ease-out 0.4s both;
  }
}

.playlist-actions {
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.tracks-section {
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

// 加载状态动画
.loading-shimmer {
  background: linear-gradient(
                  90deg,
                  var(--color-secondary-bg) 0%,
                  var(--color-border) 50%,
                  var(--color-secondary-bg) 100%
  );
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

// 悬停增强效果
.track-row {
  &:hover {
    .track-name {
      color: var(--color-primary);
      transition: color var(--transition-fast);
    }

    .track-number-container {
      .track-number {
        transform: scale(0.8);
        opacity: 0;
      }

      .play-indicator {
        transform: scale(1.1);
        opacity: 1;
      }
    }
  }
}

// 按钮点击反馈
.play-btn,
.action-btn,
.track-action-btn {
  &:active {
    transform: scale(0.95);
  }
}

// 菜单展开动画
.menu-dropdown {
  transform-origin: top right;

  &.show {
    animation: scaleIn 0.2s ease-out;
  }
}

// 响应式设计 - 歌单详情页面
@media (max-width: 1024px) {
  .playlist-hero {
    .hero-content {
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: var(--spacing-lg);
    }

    .playlist-cover-container .playlist-cover {
      width: 200px;
      height: 200px;
    }

    .playlist-info .playlist-title {
      font-size: 2.8rem;
    }
  }

  .playlist-actions {
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: stretch;

    .actions-primary,
    .actions-secondary {
      justify-content: center;
    }
  }

  .modern-tracks-table {
    .tracks-table-header,
    .track-row {
      grid-template-columns: 50px 1fr 60px;

      .header-cell.cell-album,
      .track-cell.cell-album,
      .header-cell.cell-actions,
      .track-cell.cell-actions {
        display: none;
      }
    }
  }
}

@media (max-width: 768px) {
  .playlist-hero {
    padding: var(--spacing-lg);

    .hero-content {
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: var(--spacing-lg);
    }

    .playlist-cover-container .playlist-cover {
      width: 180px;
      height: 180px;
    }

    .playlist-info .playlist-title {
      font-size: 2.5rem;
    }

    .playlist-meta {
      justify-content: center;
      flex-wrap: wrap;
      gap: var(--spacing-md);
    }
  }

  .playlist-actions {
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-md);

    .actions-primary {
      justify-content: center;
      flex-wrap: wrap;

      .play-btn {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--font-size-sm);
      }
    }

    .actions-secondary {
      justify-content: center;
      flex-wrap: wrap;

      .action-btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: var(--font-size-xs);
      }
    }
  }

  .tracks-section {
    .tracks-header {
      flex-direction: column;
      gap: var(--spacing-md);
      align-items: stretch;

      .header-left {
        text-align: center;
        flex-direction: column;
        gap: var(--spacing-xs);
      }

      .header-right .tracks-controls {
        justify-content: center;
      }
    }

    .modern-tracks-table {
      .tracks-table-header,
      .track-row {
        grid-template-columns: 40px 1fr 80px; // 为操作按钮保留空间
        padding: var(--spacing-sm) var(--spacing-md);

        .header-cell.cell-album,
        .track-cell.cell-album {
          display: none;
        }

        // 在移动端保持操作按钮可见，但简化显示
        .track-cell.cell-actions {
          .track-actions {
            opacity: 1; // 始终显示
            gap: var(--spacing-xs);

            .track-action-btn {
              width: 28px; // 减小按钮尺寸适应移动端
              height: 28px;

              .icon {
                width: 14px;
                height: 14px;
              }
            }
          }
        }

        // 为移动端歌曲行添加触摸友好的交互
        .track-row {
          &:active {
            background: var(--color-hover);
          }
        }
      }
    }
  }

  .playlist-empty-state {
    padding: var(--spacing-lg) var(--spacing-md);

    .empty-content {
      .empty-illustration .empty-icon {
        width: 60px;
        height: 60px;
      }

      .empty-title {
        font-size: var(--font-size-lg);
      }

      .empty-description {
        font-size: var(--font-size-sm);
      }

      .empty-action-btn {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--font-size-sm);
      }
    }
  }

  .tracks-table {
    .table-header {
      grid-template-columns: 40px 1fr 60px;
      padding: var(--spacing-sm) var(--spacing-md);

      .th.th-album,
      .th.th-duration {
        display: none;
      }
    }

    .track-row {
      grid-template-columns: 40px 1fr 60px;
      padding: var(--spacing-sm) var(--spacing-md);

      .td.td-album,
      .td.td-duration {
        display: none;
      }

      .td.td-actions .track-actions {
        opacity: 1; // 在移动设备上始终显示操作按钮
      }
    }
  }
}

@media (max-width: 480px) {
  .playlist-page {
    .hero-section {
      padding: var(--spacing-md);

      .playlist-cover {
        width: 140px;
        height: 140px;
      }

      .playlist-info {
        .playlist-title {
          font-size: 2rem;
        }

        .playlist-description {
          font-size: var(--font-size-sm);
        }

        .playlist-meta {
          flex-direction: column;
          gap: var(--spacing-sm);
        }
      }
    }
  }

  .playlist-actions {
    .actions-main {
      flex-direction: column;
      width: 100%;

      .action-btn.primary {
        width: 100%;
        justify-content: center;
      }

      .action-btn.secondary {
        align-self: center;
      }
    }

    .actions-extra {
      flex-direction: column;
      gap: var(--spacing-sm);

      .action-btn {
        width: 100%;
        justify-content: center;
      }
    }
  }

  .tracks-table {
    .track-row {
      .td.td-title {
        .track-info {
          .track-name,
          .track-artist {
            white-space: normal;
            overflow: visible;
            text-overflow: unset;
            line-height: 1.4;
          }

          .track-name {
            margin-bottom: var(--spacing-xs);
          }
        }
      }

      .td.td-actions {
        .track-actions {
          flex-direction: column;
          gap: var(--spacing-xs);

          .action-btn {
            width: 28px;
            height: 28px;

            .icon {
              width: 14px;
              height: 14px;
            }
          }
        }
      }
    }
  }
}

.playlist-track-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);
  cursor: pointer;

  &:hover {
    background: var(--color-bg-hover);
  }

  &.playing {
    background: rgba(var(--color-primary-rgb), 0.1);

    .track-number {
      color: var(--color-primary);
    }
  }

  .track-number {
    width: 40px;
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    font-weight: 500;
  }

  .track-info {
    flex: 1;
    min-width: 0;
    margin-left: var(--spacing-md);

    .track-title {
      font-weight: 500;
      color: var(--color-text);
      margin-bottom: var(--spacing-xs);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .track-artist {
      font-size: var(--font-size-sm);
      color: var(--color-text-secondary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }

  .track-duration {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-left: var(--spacing-md);
    min-width: 50px;
    text-align: right;
  }

  .track-actions {
    opacity: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-left: var(--spacing-md);
    transition: opacity var(--transition-fast);
  }

  &:hover .track-actions {
    opacity: 1;
  }

  .track-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);

    &:hover {
      background: var(--color-bg-hover);
    }

    .icon {
      width: 16px;
      height: 16px;
      fill: var(--color-text-secondary);
    }
  }
}

.empty-playlist {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-lg);
  color: var(--color-text-secondary);

  .empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-lg) auto;
    opacity: 0.5;
    fill: var(--color-text-secondary);
  }

  h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
  }

  p {
    font-size: var(--font-size-base);
    line-height: 1.5;
  }
}

// Settings Page (全页面模式)
.settings-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-body-bg);
  z-index: 300;
  display: none;
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  &.show {
    display: block;
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  &.hiding {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
}

.settings-container {
  height: calc(100vh - 144px); // 总高度减去导航栏(64px)和播放器(80px)
  margin-top: 64px; // 为顶部导航栏留出空间
  overflow: hidden;
  box-sizing: border-box;
}

.settings-content {
  height: 100%;
  overflow-y: auto;
  padding: var(--spacing-xl) 10vw;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

// 设置页面关闭按钮
.settings-close-btn {
  position: fixed;
  top: calc(64px + var(--spacing-lg)); // 导航栏高度 + 间距
  right: var(--spacing-xl);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  z-index: 310;
  opacity: 0;
  transform: translateY(-20px);

  &:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4757;
    border-color: rgba(255, 71, 87, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 71, 87, 0.2);
  }

  .icon {
    width: 20px;
    height: 20px;
    transition: all var(--transition-fast);
    // 浅色主题：纯黑色图标
    filter: brightness(0) saturate(100%) invert(0);
  }

  &:hover .icon {
    // 悬停时变为红色，保持可见性
    filter: brightness(0) saturate(100%) invert(0.2) sepia(1) saturate(5) hue-rotate(0deg);
  }
}

@media (max-width: 1336px) {
  .settings-content {
    padding: var(--spacing-xl) 5vw;
  }
}

.settings-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-lg) 0;

  .settings-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 var(--spacing-sm) 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }

  .settings-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
  }
}

.settings-section {
  background: var(--color-secondary-bg);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  border: 1px solid var(--color-border);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  &:last-child {
    margin-bottom: 0;
  }
}

// 设置页面显示时的动画
.settings-page.show {
  .settings-section {
    opacity: 1;
    transform: translateY(0);

    // 为每个section添加递增的延迟
    &:nth-child(2) {
      transition-delay: 0.1s;
    }

    &:nth-child(3) {
      transition-delay: 0.15s;
    }

    &:nth-child(4) {
      transition-delay: 0.2s;
    }

    &:nth-child(5) {
      transition-delay: 0.25s;
    }

    &:nth-child(6) {
      transition-delay: 0.3s;
    }

    &:nth-child(7) {
      transition-delay: 0.35s;
    }
  }

  .settings-close-btn {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
  }
}

.section-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--spacing-lg) 0;
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg) 0;
  border-bottom: 1px solid rgba(128, 128, 128, 0.1);

  &:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  &:first-child {
    padding-top: 0;
  }
}

.item-info {
  flex: 1;
  margin-right: var(--spacing-lg);

  .item-label {
    font-size: var(--font-size-md);
    font-weight: 500;
    color: var(--color-text);
    margin: 0 0 var(--spacing-xs) 0;
    display: block;
  }

  .item-description {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.4;
  }
}

.item-control {
  flex-shrink: 0;
  min-width: 200px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.settings-select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-body-bg);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all var(--transition-fast);

  &:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(51, 94, 234, 0.1);
  }

  &:hover {
    border-color: var(--color-primary);
  }
}

.settings-button {
  padding: var(--spacing-sm) var(--spacing-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: white;
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;

  &:hover {
    background: var(--color-primary);
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
  }

  &.secondary {
    background: var(--color-secondary-bg);
    color: var(--color-text);
    border-color: var(--color-border);

    &:hover {
      background: var(--color-hover);
      transform: translateY(-1px);
      box-shadow: var(--shadow-light);
    }
  }

  &.danger {
    background: #e74c3c;
    color: white;
    border-color: #c0392b;

    &:hover {
      background: #c0392b;
      transform: translateY(-1px);
      box-shadow: var(--shadow-medium);
    }
  }

  &:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
  }
}

// 切换开关样式
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.toggle-input {
  opacity: 0;
  width: 0;
  height: 0;

  &:checked + .toggle-label {
    background-color: var(--color-primary);

    &:before {
      transform: translateX(24px);
    }
  }
}

.toggle-label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 24px;
  transition: all var(--transition-fast);

  &:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }

  &:hover {
    background-color: #bbb;
  }
}

// 音量滑块样式
.volume-slider-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  width: 100%;
}

.volume-slider {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
  outline: none;
  appearance: none;

  &::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-fast);

    &:hover {
      transform: scale(1.1);
    }
  }

  &::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
}

.volume-value {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-weight: 500;
  min-width: 40px;
  text-align: right;
}

// 文件夹路径容器样式
.folder-path-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  width: 100%;
}

.folder-path {
  flex: 1;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  background: var(--color-secondary-bg);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 36px;
  display: flex;
  align-items: center;

  &.selected {
    color: var(--color-text);
    background: var(--color-body-bg);
  }
}

// Track List Styles
.track-list {
  width: 100%;
}

.track-item {
  display: grid;
  grid-template-columns: 40px 1fr 200px 80px;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
  align-items: center;

  // 带封面的布局
  &.with-cover {
    grid-template-columns: 40px 48px 1fr 200px 80px;
  }

  &:hover {
    background: var(--color-hover);
  }

  &.selected {
    background: var(--color-primary-bg);
    color: var(--color-primary);
  }

  &.playing {
    background: var(--color-primary-bg);

    .track-number {
      color: var(--color-primary);
      font-weight: 600;
    }
  }
}

.track-number {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

// 歌曲列表封面样式
.track-cover-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.track-item .track-cover {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-fast);

  &:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
}

.track-info {
  min-width: 0;

  .track-title {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
  }

  .track-artist {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.track-album {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-duration {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

// Welcome Screen
.welcome-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

.welcome-content {
  max-width: 400px;

  h1 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
  }

  p {
    font-size: var(--font-size-md);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xl);
  }
}

.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

// Buttons
.primary-button,
.secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;

  .icon {
    width: 18px;
    height: 18px;
  }
}

.primary-button {
  background: var(--color-primary);
  color: white;

  &:hover {
    background: var(--color-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
  }
}

.secondary-button {
  background: var(--color-secondary-bg);
  color: var(--color-text);

  &:hover {
    background: var(--color-hover);
  }
}

// Scan Progress
.scan-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

.scan-content {
  max-width: 400px;
  width: 100%;

  h2 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    color: var(--color-text);
  }

  p {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-top: var(--spacing-md);
  }
}

.scan-progress .progress-bar {
  width: 100%;
  height: 8px;
  background: var(--color-secondary-bg);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--spacing-md);

  .progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 4px;
    transition: width var(--transition-normal);
    width: 0%;
  }
}

// Empty State
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--color-text-secondary);
  font-size: var(--font-size-md);
}

// Error Message
.error-message {
  text-align: center;
  color: var(--color-text);

  h2 {
    color: #ef4444;
    margin-bottom: var(--spacing-md);
  }

  p {
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-secondary);
  }

  button {
    background: var(--color-primary);
    color: white;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-size: var(--font-size-sm);

    &:hover {
      background: var(--color-primary);
      opacity: 0.9;
    }
  }
}

// Modern UI Components
.modern-card {
  background: var(--gradient-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-card);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);

  &:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
  }
}

.hero-section {
  background: var(--gradient-primary);
  border-radius: var(--border-radius-xl);
  color: white;
  padding: var(--spacing-xl);
  margin-bottom: var(--section-gap);
  position: relative;
  overflow: hidden;

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-overlay);
    opacity: 0.1;
  }

  .hero-content {
    position: relative;
    z-index: 1;
  }
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;

  .title-icon {
    width: 32px;
    height: 32px;
    margin-right: var(--spacing-md);
    opacity: 0.8;
  }

  .section-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity var(--transition-fast);

    &:hover {
      opacity: 1;
    }
  }
}

.content-grid {
  display: grid;
  gap: var(--card-gap);

  &.grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  &.grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  &.grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  &.grid-5 {
    grid-template-columns: repeat(5, 1fr);
  }

  &.grid-6 {
    grid-template-columns: repeat(6, 1fr);
  }

  &.auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

.music-card {
  @extend .modern-card;
  padding: var(--spacing-lg);
  text-align: center;
  cursor: pointer;

  .card-cover {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--border-radius-cover);
    object-fit: cover;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-medium);
    transition: transform var(--transition-smooth);
  }

  &:hover .card-cover {
    transform: scale(1.05);
  }

  .card-title {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .card-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--section-gap);

  .stat-card {
    @extend .modern-card;
    padding: var(--spacing-lg);
    text-align: center;

    .stat-number {
      font-size: 32px;
      font-weight: 700;
      color: var(--color-primary);
      margin-bottom: var(--spacing-xs);
    }

    .stat-label {
      font-size: var(--font-size-sm);
      color: var(--color-text-secondary);
      font-weight: 500;
    }
  }
}

// Button styles
.button-primary {
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius-md);
  padding: 12px 24px;
  font-weight: 600;
  font-size: var(--font-size-md);
  cursor: pointer;
  transition: all var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;

  &:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
  }

  &:active {
    transform: translateY(0);
  }
}

.button-secondary {
  background: var(--gradient-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 12px 24px;
  font-weight: 600;
  font-size: var(--font-size-md);
  cursor: pointer;
  transition: all var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);

  &:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-card-hover);
    background: var(--color-hover);
  }

  &:active {
    transform: translateY(0);
  }
}

// Home page specific styles
.home-page {
  .home-section {
    margin-bottom: var(--section-gap);

    &:last-child {
      margin-bottom: 0;
    }
  }

  .empty-state {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);

    .empty-icon {
      width: 80px;
      height: 80px;
      margin: 0 auto var(--spacing-lg);
      opacity: 0.3;

      svg {
        width: 100%;
        height: 100%;
        fill: var(--color-text-secondary);
      }
    }

    .empty-title {
      font-size: var(--font-size-xl);
      font-weight: 600;
      color: var(--color-text);
      margin-bottom: var(--spacing-md);
    }

    .empty-description {
      color: var(--color-text-secondary);
      margin-bottom: var(--spacing-xl);
    }
  }
}

// Artist list item styles
.artist-list-item {
  @extend .modern-card;
  display: flex;
  align-items: center;
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  cursor: pointer;

  .artist-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: var(--spacing-lg);
    box-shadow: var(--shadow-light);
  }

  .artist-info {
    flex: 1;

    .artist-name {
      font-size: var(--font-size-lg);
      font-weight: 600;
      color: var(--color-text);
      margin-bottom: var(--spacing-xs);
    }

    .artist-stats {
      font-size: var(--font-size-sm);
      color: var(--color-text-secondary);
    }
  }

  .play-artist-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--gradient-primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-smooth);

    svg {
      width: 20px;
      height: 20px;
      fill: currentColor;
    }

    &:hover {
      transform: scale(1.1);
      box-shadow: var(--shadow-medium);
    }
  }

  &:hover {
    transform: translateY(-1px);
  }
}

// 网络磁盘配置样式
.network-drive-config {
  margin-top: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--color-secondary-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
}

.mounted-drives-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background: var(--color-body-bg);
}

.no-drives-message {
  padding: var(--spacing-lg);
  text-align: center;
  color: var(--color-text-secondary);
  font-style: italic;
}

.mounted-drive-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);

  &:last-child {
    border-bottom: none;
  }

  &:hover {
    background: var(--color-hover);
  }
}

.drive-info {
  flex: 1;
}

.drive-name {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--spacing-xs);
}

.drive-details {
  display: flex;
  gap: var(--spacing-md);
  font-size: var(--font-size-sm);
}

.drive-protocol {
  color: var(--color-text-secondary);
  background: var(--color-secondary-bg);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.drive-status {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;

  &.connected {
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.1);
  }

  &.disconnected {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
  }
}

.drive-actions {
  display: flex;
  gap: var(--spacing-sm);
}

.drives-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--spacing-sm);
}

// 网络磁盘模态框样式
#network-drive-modal {
  .modal-dialog {
    max-width: 600px;
    width: 90vw;
  }
}

.protocol-config {
  margin-top: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--color-secondary-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
}

.form-group {
  margin-bottom: var(--spacing-md);

  label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--color-text);
  }
}

.form-input, .form-select {
  width: 100%;
  padding: var(--spacing-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background: var(--color-body-bg);
  color: var(--color-text);
  font-size: var(--font-size-base);
  transition: border-color var(--transition-fast);

  &:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.1);
  }

  &::placeholder {
    color: var(--color-text-secondary);
  }
}

.form-select {
  cursor: pointer;
}

.connection-test-result {
  margin-top: var(--spacing-md);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);

  .test-status {
    font-size: 18px;

    &.testing {
      animation: pulse 1.5s ease-in-out infinite;
    }
  }

  .test-message {
    flex: 1;
    font-size: var(--font-size-sm);
  }

  &:has(.test-status.success) {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--color-success);
  }

  &:has(.test-status.error) {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-danger);
  }

  &:has(.test-status.testing) {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--color-info);
  }
}

.btn-small {
  padding: 4px 12px;
  font-size: var(--font-size-sm);
  min-height: auto;
}

// Responsive design
@media (max-width: 1024px) {
  .app {
    grid-template-columns: 200px 1fr;

    &.sidebar-collapsed {
      grid-template-columns: 64px 1fr;
    }
  }

  .player-left,
  .player-right {
    flex: 0 0 200px;
  }

  .track-item {
    grid-template-columns: 40px 1fr 150px 60px;
  }

  // 新UI组件响应式
  .content-grid {
    &.grid-6 {
      grid-template-columns: repeat(4, 1fr);
    }

    &.grid-5 {
      grid-template-columns: repeat(4, 1fr);
    }

    &.auto-fit {
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-section {
    padding: var(--spacing-lg);

    h1 {
      font-size: 28px !important;
    }

    p {
      font-size: 16px !important;
    }
  }

  .section-title {
    font-size: 24px;

    .title-icon {
      width: 28px;
      height: 28px;
    }
  }

  // 设置页面响应式
  .settings-content {
    padding: var(--spacing-lg) var(--spacing-lg);
  }

  .settings-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);

    .item-control {
      width: 100%;
      justify-content: flex-start;
      min-width: auto;
    }
  }
}

@media (max-width: 768px) {
  .app {
    grid-template-areas:
      "navbar"
      "main"
      "player";
    grid-template-columns: 1fr;
    grid-template-rows: 64px 1fr 80px;
  }

  .sidebar {
    display: none;
  }

  .player-left,
  .player-right {
    flex: 0 0 150px;
  }

  .navbar-center {
    margin: 0 var(--spacing-md);
  }

  .track-item {
    grid-template-columns: 30px 1fr 60px;

    .track-album {
      display: none;
    }
  }

  .welcome-actions {
    flex-direction: column;
  }

  // 新UI组件移动端响应式
  .content-grid {
    &.grid-6 {
      grid-template-columns: repeat(2, 1fr);
    }

    &.grid-5 {
      grid-template-columns: repeat(2, 1fr);
    }

    &.grid-4 {
      grid-template-columns: repeat(2, 1fr);
    }

    &.grid-3 {
      grid-template-columns: repeat(2, 1fr);
    }

    &.auto-fit {
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .hero-section {
    padding: var(--spacing-md);
    text-align: center;

    h1 {
      font-size: 24px !important;
    }

    p {
      font-size: 14px !important;
    }

    div[style*="display: flex"] {
      flex-direction: column;
      gap: 12px;
    }
  }

  .section-title {
    font-size: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);

    .title-icon {
      width: 24px;
      height: 24px;
    }
  }

  .music-card {
    padding: var(--spacing-md);

    .card-title {
      font-size: var(--font-size-sm);
    }

    .card-subtitle {
      font-size: var(--font-size-xs);
    }
  }

  .artist-list-item {
    padding: var(--spacing-md);

    .artist-avatar {
      width: 48px;
      height: 48px;
      margin-right: var(--spacing-md);
    }

    .artist-info .artist-name {
      font-size: var(--font-size-md);
    }

    .play-artist-btn {
      width: 40px;
      height: 40px;

      svg {
        width: 16px;
        height: 16px;
      }
    }
  }

  .button-primary,
  .button-secondary {
    padding: 10px 20px;
    font-size: var(--font-size-sm);
  }

  // 移动端设置页面优化
  .settings-header {
    .settings-title {
      font-size: 36px;
    }
  }

  .settings-section {
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
  }

  .section-title {
    font-size: var(--font-size-lg);
  }

  .settings-item {
    padding: var(--spacing-md) 0;

    .item-info .item-label {
      font-size: var(--font-size-sm);
    }

    .item-info .item-description {
      font-size: var(--font-size-xs);
    }
  }

  .item-control {
    .settings-select,
    .settings-button {
      font-size: var(--font-size-xs);
      padding: var(--spacing-xs) var(--spacing-sm);
    }
  }

  .volume-slider-container {
    gap: var(--spacing-sm);
  }
}

// 歌词页面样式
.lyrics-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: var(--color-body-bg);
  transform: translateY(100%);
  transition: transform var(--transition-normal), opacity var(--transition-normal);
  display: flex;
  overflow: hidden;
  opacity: 0;

  &.show {
    transform: translateY(0);
    opacity: 1;
  }

  // 背景渐变
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
                    135deg,
                    rgba(var(--color-primary-rgb), 0.03) 0%,
                    transparent 25%,
                    transparent 75%,
                    rgba(var(--color-primary-rgb), 0.05) 100%
    );
    z-index: 1;
    pointer-events: none;
  }

  // 添加微妙的纹理效果
  &::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.01) 0%, transparent 50%);
    z-index: 1;
    pointer-events: none;
  }
}

// 背景模糊层
.lyrics-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  filter: blur(60px) contrast(80%) brightness(120%) saturate(120%);
  opacity: 0.3;
  z-index: 0;
  transition: all var(--transition-slow);

  // 添加动态效果
  animation: backgroundPulse 20s ease-in-out infinite;

  // 深色主题下的背景调整
  [data-theme='dark'] & {
    filter: blur(60px) contrast(110%) brightness(40%) saturate(130%);
    opacity: 0.25;
  }
}

// 背景脉动动画
@keyframes backgroundPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.4;
  }
}

// 深色主题下的背景脉动
[data-theme='dark'] {
  .lyrics-background {
    @keyframes backgroundPulseDark {
      0%, 100% {
        transform: scale(1);
        opacity: 0.25;
      }
      50% {
        transform: scale(1.05);
        opacity: 0.35;
      }
    }
    animation: backgroundPulseDark 20s ease-in-out infinite;
  }
}

// 全屏按钮
.lyrics-fullscreen-button {
  position: fixed;
  top: var(--spacing-lg);
  left: var(--spacing-lg);
  z-index: 1002;

  .fullscreen-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: var(--color-secondary-bg);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(20px);
    opacity: 0.8;

    .icon {
      width: 20px;
      height: 20px;
      // 浅色主题：纯黑色图标
      filter: brightness(0) saturate(100%) invert(0);
      transition: filter var(--transition-fast);
    }

    &:hover {
      background: var(--color-hover);
      opacity: 1;
      transform: scale(1.05);

      .icon {
        // 悬停时保持纯黑色
        filter: brightness(0) saturate(100%) invert(0);
      }
    }

    &:active {
      transform: scale(0.95);
    }
  }
}

// 关闭按钮
.lyrics-close-button {
  position: fixed;
  top: var(--spacing-lg);
  right: var(--spacing-lg);
  z-index: 1002;

  .close-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: var(--color-secondary-bg);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(20px);
    opacity: 0.8;

    .icon {
      width: 20px;
      height: 20px;
      color: var(--color-text);
    }

    &:hover {
      background: var(--color-hover);
      opacity: 1;
      transform: scale(1.05);
    }
  }
}

// 主要内容区域
.lyrics-main {
  display: flex;
  width: 100%;
  height: 100vh;
  position: relative;
  z-index: 1;
}

// 左侧区域：封面和歌曲信息
.lyrics-left-side {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  margin-right: 32px;
  margin-top: 24px;
  align-items: center;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 2;

  .lyrics-cover-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 54vh;
    width: 100%;
  }
}

// 封面容器
.lyrics-cover-container {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  // 阴影效果
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.12),
  0 12px 24px rgba(0, 0, 0, 0.08),
  0 4px 8px rgba(0, 0, 0, 0.04);

  &:hover {
    transform: scale(1.02);
    box-shadow: 0 32px 72px rgba(0, 0, 0, 0.16),
    0 16px 32px rgba(0, 0, 0, 0.12),
    0 6px 12px rgba(0, 0, 0, 0.08);
  }

  // 添加背景阴影
  &::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    background: var(--color-primary);
    opacity: 0.1;
    border-radius: 8px;
    z-index: -1;
    filter: blur(20px);
  }

  .lyrics-cover-image {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 1;

    // 微妙反光效果
    &::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(
                      135deg,
                      rgba(255, 255, 255, 0.1) 0%,
                      transparent 25%,
                      transparent 75%,
                      rgba(255, 255, 255, 0.05) 100%
      );
      border-radius: 12px;
      pointer-events: none;
      opacity: 0.8;
    }
  }

  .lyrics-cover-shadow {
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    bottom: 30px;
    background: inherit;
    border-radius: var(--radius-xl);
    filter: blur(30px);
    opacity: 0.4;
    z-index: -1;
    animation: shadowPulse 4s ease-in-out infinite;
  }
}

// 封面浮动动画
@keyframes coverFloat {
  0%, 100% {
    transform: translateY(0px) rotateY(0deg);
  }
  50% {
    transform: translateY(-8px) rotateY(2deg);
  }
}

// 封面发光动画
@keyframes coverGlow {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.02);
  }
}

// 阴影脉动动画
@keyframes shadowPulse {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

// 歌曲信息
.lyrics-track-info {
  text-align: center;
  margin-bottom: 20px;
  color: var(--color-text);
  max-width: 54vh;

  .lyrics-track-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 8px 0 0 0;
    opacity: 0.88;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    transition: all 0.3s ease;
  }

  .lyrics-track-artist {
    font-size: 1rem;
    margin: 4px 0 0 0;
    color: var(--color-text);
    font-weight: 400;
    opacity: 0.58;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    transition: all 0.3s ease;

    &:hover {
      opacity: 0.88;
    }
  }
}

// 标题闪烁动画
@keyframes titleShimmer {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

// 控制区域
.lyrics-function-area {
  width: 100%;
  max-width: 54vh;
  margin-top: 24px;
  color: var(--color-text);

  .top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
  }
}

// 音量控制区域（歌词页面）
.volume-control-section {
  margin: 0 10px;
  display: flex;
  align-items: center;

  .volume-btn {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;

    .icon {
      width: 18px;
      height: 18px;
      opacity: 0.88;
      transition: opacity var(--transition-fast);
    }

    &:hover .icon {
      opacity: 1;
    }
  }

  // 使用与主页完全相同的音量条结构和样式
  .volume-bar {
    width: 84px; // 与主页保持一致
  }

  .volume-slider-container {
    width: 84px; // 与主页音量条宽度保持一致
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
  }

  .volume-slider {
    position: relative;
    width: 100%;
    height: 3px;
    background: rgba(128, 128, 128, 0.18); // 与主页保持一致的轨道颜色
    border-radius: 15px;
    overflow: visible;
  }

  .volume-fill {
    height: 100%;
    background: var(--color-text); // 与主页保持一致
    border-radius: 15px;
    transition: width var(--transition-fast), background-color var(--transition-fast);
    width: 70%; // 默认音量70%
    opacity: 0.8; // 与主页保持一致的透明度
  }

  .volume-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #ffffff; // 与主页保持一致的白色滑块
    border-radius: 50%;
    box-shadow: 0.5px 0.5px 2px 1px rgba(0, 0, 0, 0.12); // 与主页保持一致的阴影
    cursor: pointer;
    transition: all var(--transition-fast);
    left: 70%; // 对应默认音量位置

    &:hover {
      transform: translate(-50%, -50%) scale(1.1);
    }
  }

  // 悬停效果，与主页保持一致
  &:hover {
    .volume-fill {
      background-color: #335eea; // 悬停时变为主色调
    }
  }
}

// 播放模式控制区域
.playmode-control-section {
  flex-shrink: 0;

  .playmode-btn {
    position: relative;

    &.active .icon {
      filter: brightness(0) saturate(100%) invert(0.2) sepia(1) saturate(5) hue-rotate(220deg);
    }
  }
}

// 播放控制按钮
.lyrics-controls {
  display: flex;
  justify-content: center;
  //margin-top: 18px;
  align-items: center;

  .button-icon {
    margin: 0;

    .icon {
      opacity: 0.38;
      height: 14px;
      width: 14px;
      transition: all 0.3s ease;
    }

    &.active .icon {
      opacity: 0.88;
    }
  }

  // 中间的播放控制区域
  .middle {
    padding: 0 16px;
    display: flex;
    align-items: center;

    .button-icon {
      margin: 0 8px;

      .icon {
        opacity: 0.88;
        height: 22px;
        width: 22px;
      }

      &#lyrics-play-btn .icon {
        height: 28px;
        width: 28px;
        padding: 2px;
      }
    }
  }
}

// 进度条区域
.lyrics-progress-section {
  width: 100%;
  margin: var(--spacing-xs) 0 var(--spacing-xs) 0;

  .lyrics-progress-bar {
    position: relative;
    width: 100%;
    height: 20px; // 增加点击区域高度，提升用户体验
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: var(--spacing-sm);

    // 进度条轨道
    .lyrics-progress-track {
      position: relative;
      width: 100%;
      height: 2.5px;
      background: rgba(128, 128, 128, 0.18); // 与主页保持一致的轨道颜色
      border-radius: 15px;
      overflow: visible;
    }

    // 进度条填充
    .lyrics-progress-fill {
      height: 100%;
      background: var(--color-text);
      //background: #060606;
      border-radius: 15px;
      transition: width var(--transition-fast);
      width: 0%;
      position: relative;
    }

    // 进度条滑块
    .lyrics-progress-handle {
      position: absolute;
      top: 50%;
      right: -6px;
      width: 12px;
      height: 12px;
      background: var(--color-text);
      //background: #060606;
      border-radius: 50%;
      transform: translateY(-50%) scale(0.8);
      opacity: 0;
      transition: all var(--transition-fast);
      cursor: pointer;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
      z-index: 2;

      &:hover {
        transform: translateY(-50%) scale(1.2);
        opacity: 1;
      }
    }

    // 悬停效果
    &:hover {
      .lyrics-progress-track {
        height: 4px; // 悬停时轨道变粗
      }

      .lyrics-progress-fill {
        height: 4px;
      }

      .lyrics-progress-handle {
        opacity: 1;
        transform: translateY(-50%) scale(1);
      }
    }

    // 拖拽状态
    &.dragging {
      .lyrics-progress-handle {
        opacity: 1;
        transform: translateY(-50%) scale(1.1);
      }
    }
  }

  // 时间显示
  .lyrics-time {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    color: var(--color-text-secondary);
    font-weight: 500;
    opacity: 0.58;
    min-width: 28px; // 确保时间显示区域有足够宽度

    span {
      font-variant-numeric: tabular-nums; // 使数字等宽，避免时间跳动
      letter-spacing: 0.5px;
    }
  }
}

// 右侧歌词区域
.lyrics-right-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-xl) var(--spacing-lg);

  .lyrics-container {
    width: 100%;
    max-width: 720px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

// 歌词显示区域
.lyrics-display {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;

  // 隐藏滚动条
  &::-webkit-scrollbar {
    display: none;
  }

  scrollbar-width: none;

  .lyrics-text {
    width: 100%;
    text-align: center;
    padding: var(--spacing-xl) 0;

    // 歌词行间距
    .lyrics-line-spacer {
      height: 30vh;
      min-height: 150px;
    }

    .lyrics-line {
      font-size: 26px;
      line-height: 1.6;
      margin: var(--spacing-md) 0;
      padding: var(--spacing-md) var(--spacing-lg);
      color: var(--color-text-secondary);
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      cursor: pointer;
      border-radius: var(--radius-md);
      transform: scale(0.95);
      opacity: 0.6;
      user-select: none;
      font-weight: 400;
      letter-spacing: 0.3px;

      &:hover {
        background: var(--color-secondary-bg);
        opacity: 0.8;
        transform: scale(0.98);
      }

      &.highlight {
        color: var(--color-text);
        font-weight: 600;
        transform: scale(1);
        opacity: 1;
        background: var(--color-primary-bg);
        box-shadow: var(--shadow-light);
        border-radius: var(--radius-md);
      }

      &.loading {
        opacity: 0.4;
        animation: pulse 1.5s ease-in-out infinite;
      }

      // 点击反馈
      &:active {
        transform: scale(0.92);
      }
    }
  }
}


// 脉动动画
@keyframes pulse {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.6;
  }
}

// 歌词页面响应式设计
@media (max-width: 1024px) {
  .lyrics-left-side {
    flex: 0 0 380px;
    padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-lg) var(--spacing-md);

    .lyrics-cover-container {
      width: 280px;
      height: 280px;
    }

    .lyrics-track-info {
      .lyrics-track-title {
        font-size: var(--font-size-lg);
      }

      .lyrics-track-artist {
        font-size: var(--font-size-md);
      }
    }
  }

  .lyrics-right-side {
    padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-lg) var(--spacing-md);

    .lyrics-text .lyrics-line {
      font-size: 22px;
    }
  }

  // 控制面板在中等屏幕上的调整
  .lyrics-function-area {
    margin: var(--spacing-sm) 0 var(--spacing-sm) 0;

    .volume-control-section .volume-slider-container {
      max-width: 100px;
    }
  }
}

@media (max-width: 768px) {
  .lyrics-main {
    flex-direction: column;
  }

  .lyrics-left-side {
    flex: 0 0 auto;
    padding: var(--spacing-md);

    .lyrics-cover-section {
      flex-direction: row;
      align-items: center;
      gap: var(--spacing-lg);
      max-width: none;
      width: 100%;
    }

    .lyrics-cover-container {
      width: 140px;
      height: 140px;
      margin-bottom: 0;
      flex-shrink: 0;
    }

    .lyrics-track-info {
      flex: 1;
      text-align: left;
      margin-bottom: 0;
      min-width: 0;

      .lyrics-track-title {
        font-size: var(--font-size-lg);
      }

      .lyrics-track-artist {
        font-size: var(--font-size-sm);
      }
    }

    .lyrics-controls {
      margin-bottom: 0;
      gap: var(--spacing-md);
    }

    .lyrics-progress-section {
      display: none;
    }
  }

  .lyrics-right-side {
    flex: 1;
    padding: var(--spacing-md);

    .lyrics-text {
      .lyrics-line-spacer {
        height: 20vh;
        min-height: 100px;
      }

      .lyrics-line {
        font-size: 18px;
        margin: var(--spacing-sm) 0;
        padding: var(--spacing-sm) var(--spacing-md);
      }
    }
  }

  // 小屏幕上隐藏预留功能区域
  .lyrics-function-area {
    display: none;
  }

  .lyrics-fullscreen-button {
    top: var(--spacing-md);
    left: var(--spacing-md);

    .fullscreen-btn {
      width: 36px;
      height: 36px;

      .icon {
        width: 18px;
        height: 18px;
      }
    }
  }

  .lyrics-close-button {
    top: var(--spacing-md);
    right: var(--spacing-md);

    .close-btn {
      width: 36px;
      height: 36px;

      .icon {
        width: 18px;
        height: 18px;
      }
    }
  }
}

@media (max-width: 480px) {
  .lyrics-left-side {
    .lyrics-cover-container {
      width: 110px;
      height: 110px;
    }

    .lyrics-track-info {
      .lyrics-track-title {
        font-size: var(--font-size-md);
      }

      .lyrics-track-artist {
        font-size: var(--font-size-xs);
      }
    }

    .lyrics-controls {
      gap: var(--spacing-sm);
    }
  }

  .lyrics-right-side {
    .lyrics-text .lyrics-line {
      font-size: 16px;
    }
  }
}

// ===== 快捷键配置样式 =====

// 快捷键配置容器
.shortcuts-container {
  margin-top: var(--spacing-lg);
}

// 快捷键分组
.shortcuts-group {
  margin-bottom: var(--spacing-xl);

  .shortcuts-group-title {
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--spacing-md) 0;
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--color-border);
  }
}

// 快捷键列表
.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

// 快捷键项目
.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md);
  background: var(--color-secondary-bg);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;

  &:hover {
    background: var(--color-hover);
    border-color: var(--color-primary);
  }

  .shortcut-info {
    flex: 1;
    min-width: 0;

    .shortcut-name {
      font-size: var(--font-size-sm);
      font-weight: 500;
      color: var(--color-text);
      margin: 0 0 2px 0;
    }

    .shortcut-description {
      font-size: var(--font-size-xs);
      color: var(--color-text-secondary);
      margin: 0;
    }
  }

  .shortcut-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
  }

  .shortcut-key {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: var(--color-primary-bg);
    color: var(--color-primary);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
    font-family: 'Courier New', monospace;
    min-width: 80px;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;

    &:hover {
      background: var(--color-primary);
      color: white;
    }

    &.recording {
      background: #ff6b6b;
      color: white;
      animation: pulse 1s infinite;
    }

    &.disabled {
      background: var(--color-secondary-bg);
      color: var(--color-text-secondary);
      cursor: not-allowed;
    }
  }

  .shortcut-toggle {
    .toggle-switch {
      transform: scale(0.8);
    }
  }
}

// 快捷键录制动画
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

// 全局快捷键组的显示/隐藏
.shortcuts-group.hidden {
  display: none;
}

// 快捷键冲突提示
.shortcut-conflict {
  margin-top: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-xs);
  color: #856404;

  [data-theme='dark'] & {
    background: #3d2914;
    border-color: #5a4a1a;
    color: #ffeaa7;
  }
}

// 快捷键重置确认对话框
.shortcut-reset-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;

  &.show {
    opacity: 1;
    visibility: visible;
  }

  .dialog-content {
    background: var(--color-body-bg);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;

    .show & {
      transform: scale(1);
    }

    .dialog-title {
      font-size: var(--font-size-lg);
      font-weight: 600;
      color: var(--color-text);
      margin: 0 0 var(--spacing-md) 0;
    }

    .dialog-message {
      font-size: var(--font-size-sm);
      color: var(--color-text-secondary);
      margin: 0 0 var(--spacing-lg) 0;
      line-height: 1.5;
    }

    .dialog-actions {
      display: flex;
      gap: var(--spacing-sm);
      justify-content: flex-end;

      .dialog-button {
        padding: var(--spacing-sm) var(--spacing-md);
        border: none;
        border-radius: var(--border-radius-sm);
        font-size: var(--font-size-sm);
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;

        &.primary {
          background: var(--color-primary);
          color: white;

          &:hover {
            background: var(--color-primary-dark);
          }
        }

        &.secondary {
          background: var(--color-secondary-bg);
          color: var(--color-text);

          &:hover {
            background: var(--color-hover);
          }
        }
      }
    }
  }
}

// ===== 新页面样式 =====

// 通用页面样式
.page-content {
  padding: var(--spacing-lg);
  height: 100%;
  overflow-y: auto;

  .page-header {
    margin-bottom: var(--spacing-xl);

    .page-title {
      display: flex;
      align-items: center;
      gap: var(--spacing-md);
      font-size: var(--font-size-xl);
      font-weight: 600;
      color: var(--color-text);
      margin: 0 0 var(--spacing-sm) 0;

      .page-icon {
        width: 28px;
        height: 28px;
        fill: var(--color-primary);
      }
    }

    .page-subtitle {
      color: var(--color-text-secondary);
      font-size: var(--font-size-sm);
      margin: 0;
    }
  }
}

// 沉浸式首页样式
.immersive-home {
  // 音乐可视化中心
  .music-visualization-center {
    position: relative;
    height: 400px;
    margin-bottom: var(--spacing-xl);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    background: var(--gradient-primary);

    .visualization-container {
      position: relative;
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .audio-visualizer {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      opacity: 0;
      transition: opacity var(--transition-smooth);

      &.active {
        opacity: 1;
      }
    }

    .breathing-guide {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);

      .breathing-circle {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 2px solid rgba(255, 255, 255, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform var(--transition-smooth);
        opacity: 0;

        &.active {
          opacity: 1;
        }

        .breathing-text {
          color: white;
          font-size: var(--font-size-md);
          font-weight: 500;
          text-align: center;
        }
      }
    }

    .ambient-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      opacity: 0;
      transition: opacity var(--transition-smooth);
      pointer-events: none;

      &.active {
        opacity: 1;
      }
    }

    .visualization-controls {
      position: absolute;
      bottom: var(--spacing-lg);
      right: var(--spacing-lg);
      display: flex;
      gap: var(--spacing-sm);

      .viz-control-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
        cursor: pointer;
        transition: all var(--transition-smooth);
        display: flex;
        align-items: center;
        justify-content: center;

        svg {
          width: 20px;
          height: 20px;
          fill: currentColor;
        }

        &:hover {
          background: rgba(255, 255, 255, 0.2);
          transform: translateY(-2px);
        }

        &.active {
          background: rgba(255, 255, 255, 0.3);
          border-color: rgba(255, 255, 255, 0.4);
        }
      }
    }
  }

  // 情绪氛围调节器
  .mood-atmosphere-section {
    margin-bottom: var(--spacing-xl);

    .atmosphere-cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: var(--spacing-lg);

      .atmosphere-card {
        @extend .modern-card;
        padding: var(--spacing-xl);
        cursor: pointer;
        transition: all var(--transition-smooth);
        position: relative;
        overflow: hidden;

        &::before {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          background: var(--gradient-primary);
          opacity: 0;
          transition: opacity var(--transition-smooth);
        }

        &:hover {
          transform: translateY(-4px);
          box-shadow: var(--shadow-card-hover);

          &::before {
            opacity: 0.05;
          }
        }

        &.active {
          border-color: var(--color-primary);

          &::before {
            opacity: 0.1;
          }
        }

        .atmosphere-icon {
          width: 48px;
          height: 48px;
          margin-bottom: var(--spacing-md);
          color: var(--color-primary);
          position: relative;
          z-index: 1;

          svg {
            width: 100%;
            height: 100%;
            fill: currentColor;
          }
        }

        .atmosphere-content {
          position: relative;
          z-index: 1;

          h3 {
            font-size: var(--font-size-lg);
            font-weight: 600;
            color: var(--color-text);
            margin: 0 0 var(--spacing-sm) 0;
          }

          p {
            color: var(--color-text-secondary);
            font-size: var(--font-size-sm);
            margin: 0;
            line-height: 1.5;
          }
        }
      }
    }
  }

  // 专注与冥想助手
  .focus-meditation-section {
    margin-bottom: var(--spacing-xl);

    .focus-cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
      gap: var(--spacing-lg);

      .focus-card {
        @extend .modern-card;
        padding: var(--spacing-xl);
        text-align: center;
        position: relative;
        overflow: hidden;

        &::before {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          background: var(--gradient-secondary);
          opacity: 0;
          transition: opacity var(--transition-smooth);
        }

        &:hover {
          transform: translateY(-4px);
          box-shadow: var(--shadow-card-hover);

          &::before {
            opacity: 0.05;
          }
        }

        .focus-icon {
          width: 64px;
          height: 64px;
          margin: 0 auto var(--spacing-lg);
          color: var(--color-primary);
          position: relative;
          z-index: 1;

          svg {
            width: 100%;
            height: 100%;
            fill: currentColor;
          }
        }

        .focus-content {
          position: relative;
          z-index: 1;

          h3 {
            font-size: var(--font-size-xl);
            font-weight: 600;
            color: var(--color-text);
            margin: 0 0 var(--spacing-sm) 0;
          }

          p {
            color: var(--color-text-secondary);
            font-size: var(--font-size-md);
            margin: 0 0 var(--spacing-lg) 0;
            line-height: 1.5;
          }

          .focus-btn {
            background: var(--gradient-primary);
            color: white;
            border: none;
            padding: var(--spacing-md) var(--spacing-xl);
            border-radius: var(--border-radius-lg);
            font-size: var(--font-size-md);
            font-weight: 500;
            cursor: pointer;
            transition: all var(--transition-smooth);

            &:hover {
              transform: translateY(-2px);
              box-shadow: var(--shadow-medium);
            }
          }

          .timer-controls {
            display: flex;
            gap: var(--spacing-sm);
            justify-content: center;

            .timer-btn {
              background: var(--color-secondary-bg);
              color: var(--color-text);
              border: 1px solid var(--color-border);
              padding: var(--spacing-sm) var(--spacing-md);
              border-radius: var(--border-radius-md);
              font-size: var(--font-size-sm);
              cursor: pointer;
              transition: all var(--transition-smooth);

              &:hover {
                background: var(--color-primary);
                color: white;
                border-color: var(--color-primary);
              }
            }
          }
        }
      }
    }
  }

  // 音乐生活方式面板
  .music-lifestyle-section {
    margin-bottom: var(--spacing-xl);

    .lifestyle-cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
      gap: var(--spacing-lg);

      .lifestyle-card {
        @extend .modern-card;
        padding: var(--spacing-xl);
        position: relative;
        overflow: hidden;

        &::before {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          background: var(--gradient-accent);
          opacity: 0;
          transition: opacity var(--transition-smooth);
        }

        &:hover {
          transform: translateY(-4px);
          box-shadow: var(--shadow-card-hover);

          &::before {
            opacity: 0.05;
          }
        }

        .lifestyle-icon {
          width: 48px;
          height: 48px;
          margin-bottom: var(--spacing-lg);
          color: var(--color-primary);
          position: relative;
          z-index: 1;

          svg {
            width: 100%;
            height: 100%;
            fill: currentColor;
          }
        }

        .lifestyle-content {
          position: relative;
          z-index: 1;

          h3 {
            font-size: var(--font-size-lg);
            font-weight: 600;
            color: var(--color-text);
            margin: 0 0 var(--spacing-sm) 0;
          }

          p {
            color: var(--color-text-secondary);
            font-size: var(--font-size-sm);
            margin: 0 0 var(--spacing-lg) 0;
            line-height: 1.5;
          }

          .mood-buttons {
            display: flex;
            gap: var(--spacing-sm);
            margin-bottom: var(--spacing-md);

            .mood-btn {
              width: 44px;
              height: 44px;
              border-radius: 50%;
              border: 2px solid var(--color-border);
              background: var(--color-bg);
              font-size: 20px;
              cursor: pointer;
              transition: all var(--transition-smooth);
              display: flex;
              align-items: center;
              justify-content: center;

              &:hover {
                transform: scale(1.1);
                border-color: var(--color-primary);
              }

              &.selected {
                background: var(--color-primary);
                border-color: var(--color-primary);
                transform: scale(1.2);
              }
            }
          }

          .diary-input {
            width: 100%;
            min-height: 80px;
            padding: var(--spacing-md);
            border: 1px solid var(--color-border);
            border-radius: var(--border-radius-md);
            background: var(--color-bg);
            color: var(--color-text);
            font-size: var(--font-size-sm);
            font-family: inherit;
            resize: vertical;
            margin-bottom: var(--spacing-md);
            transition: border-color var(--transition-smooth);

            &:focus {
              outline: none;
              border-color: var(--color-primary);
            }

            &::placeholder {
              color: var(--color-text-secondary);
            }
          }

          .save-diary-btn {
            background: var(--gradient-primary);
            color: white;
            border: none;
            padding: var(--spacing-sm) var(--spacing-lg);
            border-radius: var(--border-radius-md);
            font-size: var(--font-size-sm);
            font-weight: 500;
            cursor: pointer;
            transition: all var(--transition-smooth);

            &:hover:not(:disabled) {
              transform: translateY(-2px);
              box-shadow: var(--shadow-medium);
            }

            &:disabled {
              opacity: 0.6;
              cursor: not-allowed;
            }
          }

          .habits-preview {
            .habit-item {
              display: flex;
              justify-content: space-between;
              align-items: center;
              padding: var(--spacing-sm) 0;
              border-bottom: 1px solid var(--color-border);

              &:last-child {
                border-bottom: none;
              }

              .habit-label {
                color: var(--color-text-secondary);
                font-size: var(--font-size-sm);
              }

              .habit-value {
                color: var(--color-text);
                font-weight: 500;
                font-size: var(--font-size-sm);
              }
            }
          }
        }
      }
    }
  }

  // 沉浸式空状态
  .immersive-empty-state {
    text-align: center;
    padding: var(--spacing-xxl) var(--spacing-lg);

    .empty-visualization {
      margin-bottom: var(--spacing-xl);
      height: 200px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;

      .empty-waves {
        position: relative;
        width: 200px;
        height: 100px;

        .wave {
          position: absolute;
          bottom: 0;
          left: 50%;
          width: 4px;
          background: var(--gradient-primary);
          border-radius: 2px;
          animation: wave-animation 2s ease-in-out infinite;

          &:nth-child(1) {
            transform: translateX(-30px);
            animation-delay: 0s;
            height: 40px;
          }

          &:nth-child(2) {
            transform: translateX(-15px);
            animation-delay: 0.2s;
            height: 60px;
          }

          &:nth-child(3) {
            transform: translateX(0);
            animation-delay: 0.4s;
            height: 80px;
          }
        }
      }
    }

    .empty-content {
      h2 {
        font-size: var(--font-size-xxl);
        font-weight: 700;
        color: var(--color-text);
        margin: 0 0 var(--spacing-md) 0;
      }

      p {
        font-size: var(--font-size-lg);
        color: var(--color-text-secondary);
        margin: 0 0 var(--spacing-xl) 0;
        line-height: 1.6;
      }

      .empty-actions {
        display: flex;
        gap: var(--spacing-lg);
        justify-content: center;
        flex-wrap: wrap;

        .immersive-btn {
          display: flex;
          align-items: center;
          gap: var(--spacing-sm);
          padding: var(--spacing-lg) var(--spacing-xl);
          border-radius: var(--border-radius-lg);
          font-size: var(--font-size-md);
          font-weight: 500;
          cursor: pointer;
          transition: all var(--transition-smooth);
          text-decoration: none;
          border: none;

          svg {
            width: 20px;
            height: 20px;
            fill: currentColor;
          }

          &.primary {
            background: var(--gradient-primary);
            color: white;

            &:hover {
              transform: translateY(-4px);
              box-shadow: var(--shadow-card-hover);
            }
          }

          &.secondary {
            background: var(--color-secondary-bg);
            color: var(--color-text);
            border: 1px solid var(--color-border);

            &:hover {
              background: var(--color-primary);
              color: white;
              border-color: var(--color-primary);
              transform: translateY(-2px);
            }
          }
        }
      }
    }
  }

  .home-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);

    .stat-card {
      background: var(--color-secondary-bg);
      border-radius: var(--radius-lg);
      padding: var(--spacing-lg);
      text-align: center;
      transition: transform var(--transition-fast);

      &:hover {
        transform: translateY(-2px);
      }

      .stat-number {
        font-size: var(--font-size-xl);
        font-weight: 700;
        color: var(--color-primary);
        margin-bottom: var(--spacing-xs);
      }

      .stat-label {
        font-size: var(--font-size-sm);
        color: var(--color-text-secondary);
      }
    }
  }

  .home-section {
    margin-bottom: var(--spacing-xl);

    .section-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: var(--spacing-md);

      .section-title {
        font-size: var(--font-size-lg);
        font-weight: 600;
        color: var(--color-text);
        margin: 0;
      }

      .section-more {
        background: none;
        border: none;
        color: var(--color-primary);
        font-size: var(--font-size-sm);
        cursor: pointer;
        padding: var(--spacing-xs) var(--spacing-sm);
        border-radius: var(--radius-sm);
        transition: background-color var(--transition-fast);

        &:hover {
          background-color: var(--color-primary-bg);
        }
      }
    }

    .track-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: var(--spacing-md);
    }
  }

  .track-card {
    background: var(--color-secondary-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: all var(--transition-fast);

    &:hover {
      transform: translateY(-4px);
      box-shadow: var(--shadow-medium);

      .track-overlay {
        opacity: 1;
      }
    }

    .track-cover {
      position: relative;
      width: 100%;
      aspect-ratio: 1;
      border-radius: var(--radius-md);
      overflow: hidden;
      margin-bottom: var(--spacing-sm);

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      .track-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity var(--transition-fast);

        .play-btn {
          width: 48px;
          height: 48px;
          border-radius: 50%;
          background: var(--color-primary);
          border: none;
          color: white;
          cursor: pointer;
          display: flex;
          align-items: center;
          justify-content: center;
          transition: transform var(--transition-fast);

          &:hover {
            transform: scale(1.1);
          }

          svg {
            width: 20px;
            height: 20px;
            fill: currentColor;
          }
        }
      }
    }

    .track-info {
      .track-title {
        font-weight: 500;
        color: var(--color-text);
        margin-bottom: var(--spacing-xs);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .track-artist {
        font-size: var(--font-size-sm);
        color: var(--color-text-secondary);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
  }

  .empty-state {
    text-align: center;
    padding: var(--spacing-xl) 0;

    .empty-icon {
      width: 80px;
      height: 80px;
      margin: 0 auto var(--spacing-lg);
      opacity: 0.5;

      svg {
        width: 100%;
        height: 100%;
        fill: var(--color-text-secondary);
      }
    }

    .empty-title {
      font-size: var(--font-size-lg);
      color: var(--color-text);
      margin-bottom: var(--spacing-sm);
    }

    .empty-description {
      color: var(--color-text-secondary);
      margin-bottom: var(--spacing-lg);
    }

    .primary-button {
      background: var(--color-primary);
      color: white;
      border: none;
      padding: var(--spacing-sm) var(--spacing-lg);
      border-radius: var(--radius-md);
      font-size: var(--font-size-sm);
      cursor: pointer;
      transition: background-color var(--transition-fast);

      &:hover {
        background: rgba(var(--color-primary-rgb), 0.8);
      }
    }
  }
}

// 最近播放页面样式
.recent-page {
  .recent-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);

    .action-btn {
      display: flex;
      align-items: center;
      gap: var(--spacing-xs);
      padding: var(--spacing-sm) var(--spacing-md);
      border-radius: var(--radius-md);
      border: none;
      font-size: var(--font-size-sm);
      cursor: pointer;
      transition: all var(--transition-fast);

      .icon {
        width: 16px;
        height: 16px;
        fill: currentColor;
      }

      &:not(.secondary) {
        background: var(--color-primary);
        color: white;

        &:hover {
          background: rgba(var(--color-primary-rgb), 0.8);
        }
      }

      &.secondary {
        background: var(--color-secondary-bg);
        color: var(--color-text);

        &:hover {
          background: var(--color-hover);
        }
      }
    }
  }

  .recent-content {
    .date-group {
      margin-bottom: var(--spacing-xl);

      .date-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: var(--spacing-md);
        padding-bottom: var(--spacing-sm);
        border-bottom: 1px solid var(--color-border);

        .date-title {
          font-size: var(--font-size-lg);
          font-weight: 600;
          color: var(--color-text);
          margin: 0;
        }

        .date-count {
          font-size: var(--font-size-sm);
          color: var(--color-text-secondary);
        }
      }

      .track-list {
        .track-item {
          display: flex;
          align-items: center;
          gap: var(--spacing-md);
          padding: var(--spacing-sm);
          border-radius: var(--radius-md);
          cursor: pointer;
          transition: background-color var(--transition-fast);

          &:hover {
            background: var(--color-hover);

            .track-overlay {
              opacity: 1;
            }

            .track-actions {
              opacity: 1;
            }
          }

          .track-cover {
            position: relative;
            width: 48px;
            height: 48px;
            border-radius: var(--radius-sm);
            overflow: hidden;
            flex-shrink: 0;

            img {
              width: 100%;
              height: 100%;
              object-fit: cover;
            }

            .track-overlay {
              position: absolute;
              top: 0;
              left: 0;
              right: 0;
              bottom: 0;
              background: rgba(0, 0, 0, 0.5);
              display: flex;
              align-items: center;
              justify-content: center;
              opacity: 0;
              transition: opacity var(--transition-fast);

              .play-btn {
                width: 24px;
                height: 24px;
                border-radius: 50%;
                background: var(--color-primary);
                border: none;
                color: white;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;

                svg {
                  width: 12px;
                  height: 12px;
                  fill: currentColor;
                }
              }
            }
          }

          .track-info {
            flex: 1;
            min-width: 0;

            .track-title {
              font-weight: 500;
              color: var(--color-text);
              margin-bottom: var(--spacing-xs);
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
            }

            .track-meta {
              display: flex;
              align-items: center;
              gap: var(--spacing-xs);
              font-size: var(--font-size-sm);
              color: var(--color-text-secondary);

              .track-artist,
              .track-album {
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
              }

              .track-separator {
                opacity: 0.5;
              }
            }
          }

          .track-time {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: var(--spacing-xs);
            font-size: var(--font-size-sm);
            color: var(--color-text-secondary);
            flex-shrink: 0;

            .play-time {
              font-weight: 500;
            }
          }

          .track-actions {
            display: flex;
            gap: var(--spacing-xs);
            opacity: 0;
            transition: opacity var(--transition-fast);

            .action-btn {
              width: 32px;
              height: 32px;
              border-radius: var(--radius-sm);
              background: var(--color-secondary-bg);
              border: none;
              color: var(--color-text-secondary);
              cursor: pointer;
              display: flex;
              align-items: center;
              justify-content: center;
              transition: all var(--transition-fast);

              &:hover {
                background: var(--color-primary);
                color: white;
              }

              svg {
                width: 16px;
                height: 16px;
                fill: currentColor;
              }
            }
          }
        }
      }
    }
  }
}

// 艺术家页面样式
.artists-page {
  .artists-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);

    .view-controls {
      display: flex;
      gap: var(--spacing-xs);

      .view-btn {
        width: 36px;
        height: 36px;
        border-radius: var(--radius-sm);
        background: var(--color-secondary-bg);
        border: none;
        color: var(--color-text-secondary);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all var(--transition-fast);

        &:hover {
          background: var(--color-hover);
        }

        &.active {
          background: var(--color-primary);
          color: white;
        }

        svg {
          width: 18px;
          height: 18px;
          fill: currentColor;
        }
      }
    }

    .sort-controls {
      .sort-select {
        padding: var(--spacing-xs) var(--spacing-sm);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-sm);
        background: var(--color-secondary-bg);
        color: var(--color-text);
        font-size: var(--font-size-sm);
        cursor: pointer;

        &:focus {
          outline: none;
          border-color: var(--color-primary);
        }
      }
    }
  }

  .artists-content {
    &.grid-view {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: var(--spacing-lg);

      .artist-card {
        background: var(--color-secondary-bg);
        border-radius: var(--radius-lg);
        padding: var(--spacing-md);
        cursor: pointer;
        transition: all var(--transition-fast);

        &:hover {
          transform: translateY(-4px);
          box-shadow: var(--shadow-medium);

          .artist-overlay {
            opacity: 1;
          }
        }

        .artist-cover {
          position: relative;
          width: 100%;
          aspect-ratio: 1;
          border-radius: var(--radius-md);
          overflow: hidden;
          margin-bottom: var(--spacing-md);

          img {
            width: 100%;
            height: 100%;
            object-fit: cover;
          }

          .artist-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity var(--transition-fast);

            .play-btn {
              width: 56px;
              height: 56px;
              border-radius: 50%;
              background: var(--color-primary);
              border: none;
              color: white;
              cursor: pointer;
              display: flex;
              align-items: center;
              justify-content: center;
              transition: transform var(--transition-fast);

              &:hover {
                transform: scale(1.1);
              }

              svg {
                width: 24px;
                height: 24px;
                fill: currentColor;
              }
            }
          }
        }

        .artist-info {
          text-align: center;

          .artist-name {
            font-size: var(--font-size-md);
            font-weight: 600;
            color: var(--color-text);
            margin: 0 0 var(--spacing-xs) 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }

          .artist-stats {
            font-size: var(--font-size-sm);
            color: var(--color-text-secondary);
            display: flex;
            justify-content: center;
            gap: var(--spacing-xs);
          }
        }
      }
    }

    &.list-view {
      .artist-row {
        display: flex;
        align-items: center;
        gap: var(--spacing-md);
        padding: var(--spacing-md);
        border-radius: var(--radius-md);
        cursor: pointer;
        transition: background-color var(--transition-fast);

        &:hover {
          background: var(--color-hover);

          .artist-actions {
            opacity: 1;
          }
        }

        .artist-cover {
          width: 64px;
          height: 64px;
          border-radius: var(--radius-md);
          overflow: hidden;
          flex-shrink: 0;

          img {
            width: 100%;
            height: 100%;
            object-fit: cover;
          }
        }

        .artist-info {
          flex: 1;
          min-width: 0;

          .artist-name {
            font-size: var(--font-size-md);
            font-weight: 600;
            color: var(--color-text);
            margin: 0 0 var(--spacing-xs) 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }

          .artist-stats {
            font-size: var(--font-size-sm);
            color: var(--color-text-secondary);
          }
        }

        .artist-actions {
          display: flex;
          gap: var(--spacing-xs);
          opacity: 0;
          transition: opacity var(--transition-fast);

          .action-btn {
            width: 36px;
            height: 36px;
            border-radius: var(--radius-sm);
            background: var(--color-secondary-bg);
            border: none;
            color: var(--color-text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all var(--transition-fast);

            &:hover {
              background: var(--color-primary);
              color: white;
            }

            svg {
              width: 18px;
              height: 18px;
              fill: currentColor;
            }
          }
        }
      }
    }
  }
}

// 艺术家详情页面样式
.artist-detail {
  .artist-header {
    margin-bottom: var(--spacing-xl);

    .back-btn {
      display: flex;
      align-items: center;
      gap: var(--spacing-xs);
      background: none;
      border: none;
      color: var(--color-text-secondary);
      font-size: var(--font-size-sm);
      cursor: pointer;
      padding: var(--spacing-xs) 0;
      margin-bottom: var(--spacing-lg);
      transition: color var(--transition-fast);

      &:hover {
        color: var(--color-primary);
      }

      svg {
        width: 16px;
        height: 16px;
        fill: currentColor;
      }
    }

    .artist-hero {
      display: flex;
      gap: var(--spacing-xl);
      align-items: flex-end;

      .artist-cover-large {
        width: 200px;
        height: 200px;
        border-radius: var(--radius-lg);
        overflow: hidden;
        flex-shrink: 0;
        box-shadow: var(--shadow-medium);

        img {
          width: 100%;
          height: 100%;
          object-fit: cover;
        }
      }

      .artist-info {
        flex: 1;

        .artist-name {
          font-size: 48px;
          font-weight: 700;
          color: var(--color-text);
          margin: 0 0 var(--spacing-md) 0;
          line-height: 1.1;
        }

        .artist-stats {
          display: flex;
          gap: var(--spacing-xs);
          font-size: var(--font-size-md);
          color: var(--color-text-secondary);
          margin-bottom: var(--spacing-lg);
        }

        .artist-actions {
          display: flex;
          gap: var(--spacing-md);

          .primary-button,
          .secondary-button {
            display: flex;
            align-items: center;
            gap: var(--spacing-xs);
            padding: var(--spacing-md) var(--spacing-lg);
            border-radius: var(--radius-md);
            font-size: var(--font-size-sm);
            font-weight: 500;
            cursor: pointer;
            transition: all var(--transition-fast);
            border: none;

            .icon {
              width: 16px;
              height: 16px;
              fill: currentColor;
            }
          }

          .primary-button {
            background: var(--color-primary);
            color: white;

            &:hover {
              background: rgba(var(--color-primary-rgb), 0.8);
              transform: translateY(-1px);
            }
          }

          .secondary-button {
            background: var(--color-secondary-bg);
            color: var(--color-text);

            &:hover {
              background: var(--color-hover);
              transform: translateY(-1px);
            }
          }
        }
      }
    }
  }

  .artist-content {
    .album-section {
      margin-bottom: var(--spacing-xl);

      .album-header {
        display: flex;
        align-items: center;
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-md);
        padding: var(--spacing-md);
        background: var(--color-secondary-bg);
        border-radius: var(--radius-lg);

        .album-cover {
          width: 64px;
          height: 64px;
          border-radius: var(--radius-md);
          overflow: hidden;
          flex-shrink: 0;

          img {
            width: 100%;
            height: 100%;
            object-fit: cover;
          }
        }

        .album-info {
          flex: 1;

          .album-title {
            font-size: var(--font-size-lg);
            font-weight: 600;
            color: var(--color-text);
            margin: 0 0 var(--spacing-xs) 0;
          }

          .album-stats {
            font-size: var(--font-size-sm);
            color: var(--color-text-secondary);
          }
        }

        .album-play-btn {
          width: 48px;
          height: 48px;
          border-radius: 50%;
          background: var(--color-primary);
          border: none;
          color: white;
          cursor: pointer;
          display: flex;
          align-items: center;
          justify-content: center;
          transition: all var(--transition-fast);

          &:hover {
            transform: scale(1.05);
            background: rgba(var(--color-primary-rgb), 0.8);
          }

          svg {
            width: 20px;
            height: 20px;
            fill: currentColor;
          }
        }
      }

      .album-tracks {
        .track-row {
          display: flex;
          align-items: center;
          gap: var(--spacing-md);
          padding: var(--spacing-sm) var(--spacing-md);
          border-radius: var(--radius-md);
          cursor: pointer;
          transition: background-color var(--transition-fast);

          &:hover {
            background: var(--color-hover);

            .track-actions {
              opacity: 1;
            }
          }

          .track-number {
            width: 24px;
            text-align: center;
            font-size: var(--font-size-sm);
            color: var(--color-text-secondary);
            flex-shrink: 0;
          }

          .track-info {
            flex: 1;
            display: flex;
            justify-content: space-between;
            align-items: center;
            min-width: 0;

            .track-title {
              font-weight: 500;
              color: var(--color-text);
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
            }

            .track-duration {
              font-size: var(--font-size-sm);
              color: var(--color-text-secondary);
              flex-shrink: 0;
            }
          }

          .track-actions {
            display: flex;
            gap: var(--spacing-xs);
            opacity: 0;
            transition: opacity var(--transition-fast);

            .action-btn {
              width: 32px;
              height: 32px;
              border-radius: var(--radius-sm);
              background: var(--color-secondary-bg);
              border: none;
              color: var(--color-text-secondary);
              cursor: pointer;
              display: flex;
              align-items: center;
              justify-content: center;
              transition: all var(--transition-fast);

              &:hover {
                background: var(--color-primary);
                color: white;
              }

              svg {
                width: 14px;
                height: 14px;
                fill: currentColor;
              }
            }
          }
        }
      }
    }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .page-content {
    padding: var(--spacing-md);
  }

  .home-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .track-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
  }

  .artists-content.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
  }

  .artist-hero {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;

    .artist-cover-large {
      width: 160px !important;
      height: 160px !important;
    }

    .artist-name {
      font-size: 32px !important;
    }
  }
}

// 统计页面样式
.statistics-page {
  .stats-overview {
    margin-bottom: var(--spacing-xl);

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: var(--spacing-lg);

      .stat-card {
        background: var(--gradient-card);
        backdrop-filter: blur(20px);
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-lg);
        padding: var(--spacing-xl);
        text-align: center;
        transition: all var(--transition-smooth);
        position: relative;
        overflow: hidden;

        &::before {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          background: var(--gradient-primary);
          opacity: 0;
          transition: opacity var(--transition-smooth);
        }

        &.primary::before {
          opacity: 0.05;
        }

        &:hover {
          transform: translateY(-4px);
          box-shadow: var(--shadow-card-hover);

          &::before {
            opacity: 0.08;
          }
        }

        .stat-icon {
          font-size: 32px;
          margin-bottom: var(--spacing-md);
          display: block;
          position: relative;
          z-index: 1;
        }

        .stat-number {
          font-size: 28px;
          font-weight: 700;
          color: var(--color-primary);
          margin-bottom: var(--spacing-xs);
          position: relative;
          z-index: 1;
        }

        .stat-label {
          font-size: var(--font-size-sm);
          color: var(--color-text-secondary);
          font-weight: 500;
          position: relative;
          z-index: 1;
        }
      }
    }
  }

  .stats-section {
    margin-bottom: var(--spacing-xl);

    .play-stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: var(--spacing-lg);

      .stat-card {
        background: var(--color-secondary-bg);
        border-radius: var(--border-radius-md);
        padding: var(--spacing-lg);
        text-align: center;
        transition: transform var(--transition-fast);

        &:hover {
          transform: translateY(-2px);
        }

        .stat-number {
          font-size: var(--font-size-xl);
          font-weight: 700;
          color: var(--color-primary);
          margin-bottom: var(--spacing-xs);
        }

        .stat-label {
          font-size: var(--font-size-sm);
          color: var(--color-text-secondary);
        }
      }
    }
  }
}

// ===== 沉浸式功能全局样式 =====

// 专注模式
body.focus-mode {
  .sidebar {
    transform: translateX(-100%);
  }

  .navbar {
    opacity: 0.3;
    transition: opacity var(--transition-smooth);

    &:hover {
      opacity: 1;
    }
  }

  .immersive-home .music-visualization-center {
    height: 60vh;
    margin-bottom: var(--spacing-lg);
  }
}

// 专注模式通知
.focus-mode-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  background: var(--gradient-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-xl);
  padding: var(--spacing-xl);
  text-align: center;
  box-shadow: var(--shadow-card-hover);
  animation: focus-notification-appear 0.5s ease-out;

  .notification-content {
    h3 {
      font-size: var(--font-size-xl);
      font-weight: 600;
      color: var(--color-text);
      margin: 0 0 var(--spacing-sm) 0;
    }

    p {
      color: var(--color-text-secondary);
      margin: 0 0 var(--spacing-lg) 0;
    }

    .exit-focus-btn {
      background: var(--gradient-secondary);
      color: white;
      border: none;
      padding: var(--spacing-sm) var(--spacing-lg);
      border-radius: var(--border-radius-md);
      font-size: var(--font-size-sm);
      cursor: pointer;
      transition: all var(--transition-smooth);

      &:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-medium);
      }
    }
  }
}

// 冥想计时器覆盖层
.meditation-timer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: timer-overlay-appear 0.3s ease-out;

  .timer-content {
    text-align: center;
    color: white;

    .timer-circle {
      width: 200px;
      height: 200px;
      border-radius: 50%;
      border: 4px solid rgba(255, 255, 255, 0.3);
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto var(--spacing-xl);
      position: relative;

      &::before {
        content: '';
        position: absolute;
        top: -4px;
        left: -4px;
        right: -4px;
        bottom: -4px;
        border-radius: 50%;
        border: 4px solid transparent;
        border-top-color: var(--color-primary);
        animation: timer-progress 1s linear infinite;
      }

      .timer-text {
        .timer-minutes {
          font-size: 48px;
          font-weight: 700;
          line-height: 1;
        }

        .timer-label {
          font-size: var(--font-size-md);
          opacity: 0.8;
          margin-top: var(--spacing-xs);
        }
      }
    }

    .timer-controls {
      display: flex;
      gap: var(--spacing-lg);
      justify-content: center;

      button {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
        padding: var(--spacing-md) var(--spacing-lg);
        border-radius: var(--border-radius-lg);
        font-size: var(--font-size-md);
        cursor: pointer;
        transition: all var(--transition-smooth);

        &:hover {
          background: rgba(255, 255, 255, 0.2);
          transform: translateY(-2px);
        }
      }
    }

    .timer-complete {
      .complete-icon {
        font-size: 64px;
        margin-bottom: var(--spacing-lg);
      }

      h3 {
        font-size: var(--font-size-xxl);
        font-weight: 600;
        margin: 0 0 var(--spacing-md) 0;
      }

      p {
        font-size: var(--font-size-lg);
        opacity: 0.8;
        margin: 0 0 var(--spacing-xl) 0;
      }

      .close-timer-btn {
        background: var(--gradient-primary);
        border: none;
        color: white;
        padding: var(--spacing-md) var(--spacing-xl);
        border-radius: var(--border-radius-lg);
        font-size: var(--font-size-md);
        font-weight: 500;
        cursor: pointer;
        transition: all var(--transition-smooth);

        &:hover {
          transform: translateY(-2px);
          box-shadow: var(--shadow-medium);
        }
      }
    }
  }
}

// 动画定义
@keyframes focus-notification-appear {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes timer-overlay-appear {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(10px);
  }
}

@keyframes timer-progress {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes wave-animation {
  0%, 100% {
    transform: scaleY(0.5);
    opacity: 0.7;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

// ===== 均衡器样式 =====

// 均衡器弹窗
.equalizer-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);

  &.show {
    opacity: 1;
    visibility: visible;
  }
}

.equalizer-modal-content {
  background: var(--color-body-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-heavy);
  border: 1px solid var(--color-border);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform var(--transition-smooth);

  .equalizer-modal.show & {
    transform: scale(1);
  }
}

.equalizer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-secondary-bg);

  .equalizer-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
  }

  .equalizer-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);

    &:hover {
      background: var(--color-hover);
    }

    .icon {
      width: 20px;
      height: 20px;
    }
  }
}

.equalizer-body {
  padding: var(--spacing-lg);
}

// 预设选择器
.equalizer-presets {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);

  .preset-label {
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
  }

  .preset-select {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-body-bg);
    color: var(--color-text);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: border-color var(--transition-fast);

    &:focus {
      outline: none;
      border-color: var(--color-primary);
    }

    &:hover {
      border-color: var(--color-primary);
    }
  }

  .preset-manage-btn {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--color-body-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);

    &:hover {
      background: var(--color-hover);
      border-color: var(--color-primary);
    }

    .icon {
      width: 1rem;
      height: 1rem;
      opacity: 0.7;
    }
  }
}

// 自定义预设管理面板
.custom-presets-panel {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-xl);
  overflow: hidden;

  .custom-presets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--color-hover);
    border-bottom: 1px solid var(--color-border);

    h3 {
      margin: 0;
      font-size: var(--font-size-md);
      font-weight: 600;
      color: var(--color-text);
    }

    .close-panel-btn {
      width: 2rem;
      height: 2rem;
      background: none;
      border: none;
      border-radius: var(--radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 1.2rem;
      color: var(--color-text-secondary);
      transition: all var(--transition-fast);

      &:hover {
        background: var(--color-hover);
        color: var(--color-text);
      }
    }
  }

  .custom-presets-content {
    padding: var(--spacing-lg);

    h4 {
      margin: 0 0 var(--spacing-md) 0;
      font-size: var(--font-size-sm);
      font-weight: 600;
      color: var(--color-text);
    }

    .save-preset-section {
      margin-bottom: var(--spacing-xl);
      padding-bottom: var(--spacing-lg);
      border-bottom: 1px solid var(--color-border);

      .save-preset-controls {
        display: flex;
        gap: var(--spacing-md);

        #new-preset-name {
          flex: 1;
          padding: var(--spacing-sm) var(--spacing-md);
          border: 1px solid var(--color-border);
          border-radius: var(--radius-sm);
          background: var(--color-body-bg);
          color: var(--color-text);
          font-size: var(--font-size-sm);

          &:focus {
            outline: none;
            border-color: var(--color-primary);
          }

          &::placeholder {
            color: var(--color-text-secondary);
          }
        }

        .preset-action-btn {
          padding: var(--spacing-sm) var(--spacing-lg);
          border: 1px solid var(--color-border);
          border-radius: var(--radius-sm);
          font-size: var(--font-size-sm);
          font-weight: 500;
          cursor: pointer;
          transition: all var(--transition-fast);

          &.save-btn {
            background: var(--color-primary);
            border-color: var(--color-primary);
            color: white;

            &:hover {
              background: var(--color-primary-hover);
              border-color: var(--color-primary-hover);
            }

            &:disabled {
              background: var(--color-text-secondary);
              border-color: var(--color-text-secondary);
              cursor: not-allowed;
            }
          }
        }
      }
    }

    .custom-presets-list {
      .presets-list-container {
        max-height: 200px;
        overflow-y: auto;
      }

      .preset-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: var(--spacing-md);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-sm);
        margin-bottom: var(--spacing-sm);
        background: var(--color-body-bg);
        transition: all var(--transition-fast);

        &:hover {
          border-color: var(--color-primary);
          box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.1);
          transform: translateY(-1px);
        }

        .preset-info {
          .preset-name {
            font-weight: 500;
            color: var(--color-text);
            margin-bottom: 0.25rem;
          }

          .preset-date {
            font-size: var(--font-size-xs);
            color: var(--color-text-secondary);
          }
        }

        .preset-actions {
          display: flex;
          gap: var(--spacing-sm);

          .preset-action-btn {
            padding: var(--spacing-xs) var(--spacing-sm);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-sm);
            font-size: var(--font-size-xs);
            font-weight: 500;
            cursor: pointer;
            transition: all var(--transition-fast);
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 50px;

            // 默认样式（确保基本可见性）
            background: var(--color-body-bg);
            color: var(--color-text);

            &:focus {
              outline: 2px solid var(--color-primary);
              outline-offset: 2px;
            }

            &.load-btn {
              background: var(--color-success);
              border-color: var(--color-success);
              color: #ffffff;
              font-weight: 600;

              // 确保文字在浅色背景下可见
              text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);

              &:hover {
                background: var(--color-success-hover);
                border-color: var(--color-success-hover);
                transform: translateY(-1px);
                box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
              }

              &:active {
                transform: translateY(0);
                box-shadow: 0 1px 2px rgba(16, 185, 129, 0.3);
              }
            }

            &.delete-btn {
              background: var(--color-danger);
              border-color: var(--color-danger);
              color: #ffffff;
              font-weight: 600;

              // 确保文字在浅色背景下可见
              text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);

              &:hover {
                background: var(--color-danger-hover);
                border-color: var(--color-danger-hover);
                transform: translateY(-1px);
                box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
              }

              &:active {
                transform: translateY(0);
                box-shadow: 0 1px 2px rgba(239, 68, 68, 0.3);
              }
            }
          }
        }
      }

      .no-presets {
        text-align: center;
        padding: var(--spacing-xl);
        color: var(--color-text-secondary);
        font-style: italic;
      }
    }
  }
}

// 频段控制
.equalizer-bands {
  margin-bottom: var(--spacing-xl);

  .band-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);

    .band-label {
      font-size: var(--font-size-xs);
      font-weight: 500;
      color: var(--color-text-secondary);
      text-align: center;
      width: 60px;
    }
  }

  .band-sliders {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 200px;
    padding: var(--spacing-md);
    background: var(--color-secondary-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
  }
}

.band-slider-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 60px;

  .band-slider {
    writing-mode: bt-lr; /* IE */
    -webkit-appearance: slider-vertical; /* WebKit */
    width: 20px;
    height: 150px;
    background: transparent;
    outline: none;
    cursor: pointer;
    margin-bottom: var(--spacing-sm);

    // WebKit样式
    &::-webkit-slider-track {
      width: 4px;
      height: 150px;
      background: var(--color-border);
      border-radius: 2px;
    }

    &::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 16px;
      height: 16px;
      background: var(--color-primary);
      border-radius: 50%;
      cursor: pointer;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
      transition: all var(--transition-fast);

      &:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
      }
    }

    // Firefox样式
    &::-moz-range-track {
      width: 4px;
      height: 150px;
      background: var(--color-border);
      border-radius: 2px;
      border: none;
    }

    &::-moz-range-thumb {
      width: 16px;
      height: 16px;
      background: var(--color-primary);
      border-radius: 50%;
      cursor: pointer;
      border: none;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
      transition: all var(--transition-fast);

      &:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
      }
    }
  }

  .band-value {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--color-text);
    text-align: center;
    min-height: 16px;
    margin-top: var(--spacing-xs);
  }
}

// 控制按钮
.equalizer-controls {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-md);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--color-border);

  .equalizer-button {
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;

    &.primary {
      background: var(--color-primary);
      color: white;

      &:hover {
        background: var(--color-primary);
        transform: translateY(-1px);
        box-shadow: var(--shadow-medium);
      }
    }

    &.secondary {
      background: var(--color-secondary-bg);
      color: var(--color-text);
      border: 1px solid var(--color-border);

      &:hover {
        background: var(--color-hover);
      }
    }
  }
}

// 设置页面中的均衡器设置项
.equalizer-settings {
  &.disabled {
    opacity: 0.5;
    pointer-events: none;
  }
}

// Empty state for playlist
.playlist-empty-state {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--color-text-secondary);

  .empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-lg) auto;
    fill: currentColor;
    opacity: 0.5;
  }

  h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--color-text);
  }

  p {
    margin: 0 0 var(--spacing-lg) 0;
    font-size: var(--font-size-md);
  }
}
